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)
#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"
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");
fi
systemd-run --unit test-aux-scope.service \
- -p Slice=aux.slice -p Type=exec -p TasksMax=99 -p CPUWeight=199 -p IPAccounting=yes \
+ --service-type notify -p Slice=aux.slice -p TasksMax=99 -p CPUWeight=199 -p IPAccounting=yes \
/usr/lib/systemd/tests/unit-tests/manual/test-aux-scope
kill -s USR1 "$(systemctl show --value --property MainPID test-aux-scope.service)"