mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user