mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
[pty_test] Test that poll() actually sets the POLLIN flag in PollAndReadFd
PiperOrigin-RevId: 534841961
This commit is contained in:
@@ -374,6 +374,8 @@ PosixErrorOr<size_t> PollAndReadFd(int fd, void* buf, size_t count,
|
||||
continue;
|
||||
}
|
||||
return PosixError(errno, "read failed");
|
||||
} else if (n > 0 && (pfd.revents & POLLIN) == 0) {
|
||||
return PosixError(EINVAL, "Poll said not readable but data was read");
|
||||
}
|
||||
completed += n;
|
||||
if (completed >= count) {
|
||||
|
||||
Reference in New Issue
Block a user