diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-12-10 16:28:45 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-12-10 20:19:54 +0100 |
commit | a33813e9e9fd6debcc566f0882b7e5623507ae69 (patch) | |
tree | 8cf1a33423a6f1707cd90bc43b1dce58864eb421 | |
parent | sd-varlink: add function to configure server object info (#35519) (diff) | |
download | systemd-a33813e9e9fd6debcc566f0882b7e5623507ae69.tar.xz systemd-a33813e9e9fd6debcc566f0882b7e5623507ae69.zip |
TEST-07-PID: wait for sleep command being executed by sd-executor
Hopefully fixes #35528.
-rwxr-xr-x | test/units/TEST-07-PID1.private-pids.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/units/TEST-07-PID1.private-pids.sh b/test/units/TEST-07-PID1.private-pids.sh index a64b124d93..eede43cbaf 100755 --- a/test/units/TEST-07-PID1.private-pids.sh +++ b/test/units/TEST-07-PID1.private-pids.sh @@ -50,7 +50,7 @@ testcase_basic() { systemd-run -p PrivatePIDs=yes --remain-after-exit --unit TEST-07-PID1-private-pid sleep infinity # Wait for ExecMainPID to be correctly populated as there might be a race between spawning service # and actual exec child process - sleep 2 + timeout 10s bash -xec 'until [[ "$(cat /proc/$(systemctl show TEST-07-PID1-private-pid.service -p ExecMainPID --value)/comm)" == sleep ]]; do sleep .5; done' pid=$(systemctl show TEST-07-PID1-private-pid.service -p ExecMainPID --value) kill -9 "$pid" timeout 10s bash -xec 'while [[ "$(systemctl show -P SubState TEST-07-PID1-private-pid.service)" != "failed" ]]; do sleep .5; done' |