TEST-07-PID1: Fix race in aux-scope subtest
Currently test-aux-scope.service can get killed by the test before it's had a chance to setup its signal handler. Make it Type=notify to fix the race. Fixes #32670 (hopefully)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "bus-error.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-wait-for-jobs.h"
|
||||
#include "daemon-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_syscall.h"
|
||||
@@ -152,6 +153,10 @@ int main(int argc, char *argv[]) {
|
||||
pids[i] = TAKE_PIDREF(pidref);
|
||||
}
|
||||
|
||||
r = sd_notify(false, NOTIFY_READY);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to send readiness notification: %m");
|
||||
|
||||
r = sd_event_loop(event);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to run event loop: %m");
|
||||
|
||||
Reference in New Issue
Block a user