diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2019-09-23 15:59:23 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-23 16:00:50 -0700 |
commit | 9846da5e654fc5649269e4a45fa711d4519c343e (patch) | |
tree | 685de2833572896ad79113c0ae3ba665cdb2a9b6 /test | |
parent | 112736c579690b4fee61e842a65a62fe29b1acb5 (diff) |
Fix bug in RstCausesPollHUP.
The test is checking the wrong poll_fd for POLLHUP. The only
reason it passed till now was because it was also checking
for POLLIN which was always true on the other fd from the
previous poll!
PiperOrigin-RevId: 270780401
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/socket_ip_tcp_generic.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/socket_ip_tcp_generic.cc b/test/syscalls/linux/socket_ip_tcp_generic.cc index a43cf9bce..bfa7943b1 100644 --- a/test/syscalls/linux/socket_ip_tcp_generic.cc +++ b/test/syscalls/linux/socket_ip_tcp_generic.cc @@ -117,7 +117,7 @@ TEST_P(TCPSocketPairTest, RSTCausesPollHUP) { struct pollfd poll_fd3 = {sockets->first_fd(), POLLHUP, 0}; ASSERT_THAT(RetryEINTR(poll)(&poll_fd3, 1, kPollTimeoutMs), SyscallSucceedsWithValue(1)); - ASSERT_NE(poll_fd.revents & (POLLHUP | POLLIN), 0); + ASSERT_NE(poll_fd3.revents & POLLHUP, 0); } // This test validates that even if a RST is sent the other end will not |