X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=test%2FTEST-03-JOBS%2Ftest-jobs.sh;h=28368b70e4b792e3e7b45ce6bd557b5ad12fa3e0;hb=0370612e0522191f929e3feb7d4937fff3d421e2;hp=12b38af94204ba6113e30b18746b2069e5e8a892;hpb=37d3ab1b7e114f0fb6dfb2e7273569b42794b76a;p=elogind.git diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh index 12b38af94..28368b70e 100755 --- a/test/TEST-03-JOBS/test-jobs.sh +++ b/test/TEST-03-JOBS/test-jobs.sh @@ -21,6 +21,15 @@ ELAPSED=$(($END_SEC-$START_SEC)) systemctl list-jobs > /root/list-jobs.txt grep 'sleep\.service.*running' /root/list-jobs.txt || exit 1 grep 'hello\.service' /root/list-jobs.txt && exit 1 +systemctl stop sleep.service hello-after-sleep.target || exit 1 + +# Test for a crash when enqueueing a JOB_NOP when other job already exists +systemctl start --no-block hello-after-sleep.target || exit 1 +# hello.service should still be waiting, so these try-restarts will collapse +# into NOPs. +systemctl try-restart --fail hello.service || exit 1 +systemctl try-restart hello.service || exit 1 +systemctl stop hello.service sleep.service hello-after-sleep.target || exit 1 # TODO: add more job queueing/merging tests here.