From 09b7791e89d9d487d03cf03cf2ba2d0fb1c9386a Mon Sep 17 00:00:00 2001 From: Craig Chi Date: Tue, 30 Jun 2020 09:03:14 -0700 Subject: Add missing ICRNL flag in master termios test Closes #2768 --- test/syscalls/linux/pty.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/syscalls') 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)); -- cgit v1.2.3