mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
test/pty: last read in TermiosICANONEOF returns 0 on new linux kernels
[==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from PtyTest [ RUN ] PtyTest.TermiosICANONEOF test/syscalls/linux/pty.cc:464: Failure Value of: ReadFd(fd.get(), &c, 1) Expected: -1 (failure), with errno PosixError(errno=11 Resource temporarily unavailable) Actual: 0 (of type long) [ FAILED ] PtyTest.TermiosICANONEOF (20018 ms) [----------] 1 test from PtyTest (20018 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (20018 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] PtyTest.TermiosICANONEOF PiperOrigin-RevId: 452799870
This commit is contained in:
@@ -1120,7 +1120,10 @@ TEST_F(PtyTest, TermiosICANONEOF) {
|
||||
ExpectReadable(replica_, sizeof(input), buf);
|
||||
EXPECT_STREQ(buf, "abc");
|
||||
|
||||
ExpectFinished(replica_);
|
||||
// New Linux kernels can return zero.
|
||||
EXPECT_THAT(
|
||||
ReadFd(replica_.get(), buf, 1),
|
||||
AnyOf(SyscallSucceedsWithValue(0), SyscallFailsWithErrno(EAGAIN)));
|
||||
}
|
||||
|
||||
// ICANON limits us to 4096 bytes including a terminating character. Anything
|
||||
|
||||
Reference in New Issue
Block a user