]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-process-util: don't run rest of test suite in forked off child
authorLennart Poettering <lennart@poettering.net>
Mon, 13 Jan 2025 10:10:09 +0000 (11:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Jan 2025 10:55:21 +0000 (11:55 +0100)
We left the test suite running in the child after forking off a
temporary child for testing. That's bad. fix it.

src/test/test-process-util.c

index 12bac656e20632bd5262a86c35890bd15b42d923..48c5f44e013a74b5ae10874694093aa0ad4e541c 100644 (file)
@@ -1007,7 +1007,7 @@ TEST(pid_get_start_time) {
 
         _cleanup_(pidref_done_sigkill_wait) PidRef child = PIDREF_NULL;
 
-        ASSERT_OK(pidref_safe_fork("(stub)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_REOPEN_LOG, &child));
+        ASSERT_OK_POSITIVE(pidref_safe_fork("(stub)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_REOPEN_LOG|FORK_FREEZE, &child));
 
         usec_t start_time2;
         ASSERT_OK(pidref_get_start_time(&child, &start_time2));