diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-06 12:08:03 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-06 12:08:03 -0700 |
commit | 47bffa544a717acf0de66cf6ecfb137dba2fb39e (patch) | |
tree | 2463b05ad758898967828f3d09a381988a636f2a /test/syscalls | |
parent | 043e5dddde43ea6c0cdec85d6bb30c16d3287526 (diff) | |
parent | 09b7791e89d9d487d03cf03cf2ba2d0fb1c9386a (diff) |
Merge pull request #3110 from craig08:add-missing-ICRNL
PiperOrigin-RevId: 319827554
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/pty.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/syscalls/linux/pty.cc b/test/syscalls/linux/pty.cc index aabfa6955..f9392b9e0 100644 --- a/test/syscalls/linux/pty.cc +++ b/test/syscalls/linux/pty.cc @@ -634,6 +634,11 @@ TEST_F(PtyTest, TermiosAffectsSlave) { // Verify this by setting ICRNL (which rewrites input \r to \n) and verify that // it has no effect on the master. TEST_F(PtyTest, MasterTermiosUnchangable) { + struct kernel_termios master_termios = {}; + EXPECT_THAT(ioctl(master_.get(), TCGETS, &master_termios), SyscallSucceeds()); + master_termios.c_lflag |= ICRNL; + EXPECT_THAT(ioctl(master_.get(), TCSETS, &master_termios), SyscallSucceeds()); + char c = '\r'; ASSERT_THAT(WriteFd(slave_.get(), &c, 1), SyscallSucceedsWithValue(1)); |