summaryrefslogtreecommitdiff
path: root/test/TEST-03-JOBS
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-26 16:33:40 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-26 16:33:40 +0100
commit06c1c4f98c0d0b4c93e58d75ed5a08d722ec4de3 (patch)
treeba16b526a87e51e8e3f1961931ad6ccef74365dd /test/TEST-03-JOBS
parentd108ddf172103695463750c58d013b7ae477f686 (diff)
test: add test for crash when adding a JOB_NOP
Diffstat (limited to 'test/TEST-03-JOBS')
-rwxr-xr-xtest/TEST-03-JOBS/test-jobs.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh
index 12b38af942..28368b70e4 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.