From: Daan De Meyer Date: Tue, 4 Mar 2025 21:31:39 +0000 (+0100) Subject: test-async: Wait for asynchronous_sync() to finish X-Git-Tag: v258-rc1~1179^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F36611%2Fhead;p=thirdparty%2Fsystemd.git test-async: Wait for asynchronous_sync() to finish Otherwise, if the system is busy, TEST-02-UNITTESTS will fail as systemd will time out trying to kill the transient unit that we're running test-async in. --- diff --git a/src/test/test-async.c b/src/test/test-async.c index 443505c3eb0..2b87faba7db 100644 --- a/src/test/test-async.c +++ b/src/test/test-async.c @@ -15,7 +15,9 @@ #include "tmpfile-util.h" TEST(asynchronous_sync) { - ASSERT_OK(asynchronous_sync(NULL)); + _cleanup_(pidref_done) PidRef pidref = PIDREF_NULL; + ASSERT_OK(asynchronous_sync(&pidref)); + ASSERT_OK(pidref_wait_for_terminate(&pidref, /* ret= */ NULL)); } static void wait_fd_closed(int fd) {