Remove side effect from pty tests
Individual test cases must not rely on being executed in a clean environment. PiperOrigin-RevId: 358207468
This commit is contained in:
parent
f4d694693c
commit
582f7bf6c0
|
@ -1316,7 +1316,10 @@ class JobControlTest : public ::testing::Test {
|
|||
// In the gVisor test environment, this test will be run as the session
|
||||
// leader already (as the sentry init process).
|
||||
if (!IsRunningOnGvisor()) {
|
||||
ASSERT_THAT(setsid(), SyscallSucceeds());
|
||||
// Ignore failure because setsid(2) fails if the process is already the
|
||||
// session leader.
|
||||
setsid();
|
||||
ioctl(replica_.get(), TIOCNOTTY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue