From 52e674b44d77b0a227d2b74dd75ae29c036fb01b Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 22 Aug 2019 13:19:47 -0700 Subject: Remove ASSERT from fork child The gunit macros are not safe to use in the child. PiperOrigin-RevId: 264904348 --- test/syscalls/linux/pty_root.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/syscalls/linux/pty_root.cc b/test/syscalls/linux/pty_root.cc index 14a4af980..d2a321a6e 100644 --- a/test/syscalls/linux/pty_root.cc +++ b/test/syscalls/linux/pty_root.cc @@ -50,7 +50,7 @@ TEST(JobControlRootTest, StealTTY) { // of 1. pid_t child = fork(); if (!child) { - ASSERT_THAT(setsid(), SyscallSucceeds()); + TEST_PCHECK(setsid() >= 0); // We shouldn't be able to steal the terminal with the wrong arg value. TEST_PCHECK(ioctl(slave.get(), TIOCSCTTY, 0)); // We should be able to steal it here. -- cgit v1.2.3