diff --git a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service index 4fd7716081..e285277188 100644 --- a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service +++ b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.service @@ -3,6 +3,8 @@ Description=Issue 14566 Repro [Service] +Type=notify +NotifyAccess=all ExecStart=/usr/lib/systemd/tests/testdata/TEST-07-PID1.units/%N.sh ExecStopPost=true KillMode=mixed diff --git a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh index 74fa7605e7..6a85ce608f 100755 --- a/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh +++ b/test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue14566-repro.sh @@ -2,5 +2,6 @@ # SPDX-License-Identifier: LGPL-2.1-or-later sleep infinity & -echo $! >/leakedtestpid +echo $! >/run/leakedtestpid +systemd-notify --ready wait $! diff --git a/test/units/TEST-07-PID1.issue-14566.sh b/test/units/TEST-07-PID1.issue-14566.sh index ecc18e411b..ee1021a12e 100755 --- a/test/units/TEST-07-PID1.issue-14566.sh +++ b/test/units/TEST-07-PID1.issue-14566.sh @@ -6,21 +6,14 @@ set -o pipefail # Test that KillMode=mixed does not leave left over processes with ExecStopPost= # Issue: https://github.com/systemd/systemd/issues/14566 -if [[ -v ASAN_OPTIONS ]]; then - # Temporarily skip this test when running with sanitizers due to a deadlock - # See: https://bugzilla.redhat.com/show_bug.cgi?id=2098125 - echo "Sanitizers detected, skipping the test..." - exit 0 -fi - +rm -f /run/leakedtestpid systemctl start issue14566-repro -sleep 4 systemctl status issue14566-repro -leaked_pid=$(cat /leakedtestpid) +leaked_pid=$(cat /run/leakedtestpid) systemctl stop issue14566-repro -sleep 4 +timeout 30 bash -c 'while systemctl is-active issue14566-repro; do sleep .5; done' # Leaked PID will still be around if we're buggy. # I personally prefer to see 42.