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.
This commit is contained in:
Daan De Meyer
2025-03-04 22:31:39 +01:00
parent 3041e377a8
commit 35c59ac249

View File

@@ -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) {