mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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
This commit is contained in:
committed by
gVisor bot
parent
112736c579
commit
9846da5e65
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user