tests: don't use ASSERT_THAT after fork

PiperOrigin-RevId: 277965624
This commit is contained in:
Andrei Vagin 2019-11-01 11:21:06 -07:00 committed by gVisor bot
parent a99d3479a8
commit af6af2c341
1 changed files with 2 additions and 3 deletions

View File

@ -447,9 +447,8 @@ TEST(SemaphoreTest, SemCtlGetPidFork) {
const pid_t child_pid = fork();
if (child_pid == 0) {
ASSERT_THAT(semctl(sem.get(), 0, SETVAL, 1), SyscallSucceeds());
ASSERT_THAT(semctl(sem.get(), 0, GETPID),
SyscallSucceedsWithValue(getpid()));
TEST_PCHECK(semctl(sem.get(), 0, SETVAL, 1) == 0);
TEST_PCHECK(semctl(sem.get(), 0, GETPID) == getpid());
_exit(0);
}