110222764SJonas Devlieghereimport lldb 210222764SJonas Devliegherefrom lldbsuite.test.decorators import * 310222764SJonas Devliegherefrom lldbsuite.test.lldbtest import * 410222764SJonas Devliegherefrom lldbsuite.test.lldbpexpect import PExpectTest 510222764SJonas Devlieghere 610222764SJonas Devlieghereclass TestIOHandlerProcessSTDIO(PExpectTest): 710222764SJonas Devlieghere NO_DEBUG_INFO_TESTCASE = True 810222764SJonas Devlieghere 910222764SJonas Devlieghere # PExpect uses many timeouts internally and doesn't play well 1010222764SJonas Devlieghere # under ASAN on a loaded machine.. 1110222764SJonas Devlieghere @skipIfAsan 12*de0b4f4bSMuhammad Omair Javaid @skipIf(oslist=["linux"], archs=["arm", "aarch64"]) 1310222764SJonas Devlieghere def test(self): 1410222764SJonas Devlieghere self.build() 1510222764SJonas Devlieghere self.launch(executable=self.getBuildArtifact("a.out")) 1610222764SJonas Devlieghere self.child.sendline("run") 1710222764SJonas Devlieghere 1810222764SJonas Devlieghere self.child.send("foo\n") 1910222764SJonas Devlieghere self.child.expect_exact("stdout: foo") 2010222764SJonas Devlieghere 2110222764SJonas Devlieghere self.child.send("bar\n") 2210222764SJonas Devlieghere self.child.expect_exact("stdout: bar") 2310222764SJonas Devlieghere 2410222764SJonas Devlieghere self.child.send("baz\n") 2510222764SJonas Devlieghere self.child.expect_exact("stdout: baz") 2610222764SJonas Devlieghere 2710222764SJonas Devlieghere self.child.sendcontrol('d') 2810222764SJonas Devlieghere self.quit() 29