diff options
author | Craig Chi <craigchi@google.com> | 2020-06-30 09:03:14 -0700 |
---|---|---|
committer | Craig Chi <craigchi@google.com> | 2020-06-30 09:31:28 -0700 |
commit | 09b7791e89d9d487d03cf03cf2ba2d0fb1c9386a (patch) | |
tree | 195e7952bb8655eecd88d5fb70451ed2987d9dcb /test/syscalls/linux | |
parent | 5b0d8ff6919a071effb9cf69ad715487f55ca2f3 (diff) |
Add missing ICRNL flag in master termios test
Closes #2768
Diffstat (limited to 'test/syscalls/linux')
-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)); |