X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=test%2FTEST-03-JOBS%2Ftest-jobs.sh;h=12b38af94204ba6113e30b18746b2069e5e8a892;hb=2e8574290d36801acffaf51a9a00a77b972a255b;hp=98746c53636b93f185996688ed4a9e4932f42ed7;hpb=b5da077ddf01546c4a85688624d6957766d6c00c;p=elogind.git diff --git a/test/TEST-03-JOBS/test-jobs.sh b/test/TEST-03-JOBS/test-jobs.sh index 98746c536..12b38af94 100755 --- a/test/TEST-03-JOBS/test-jobs.sh +++ b/test/TEST-03-JOBS/test-jobs.sh @@ -24,5 +24,18 @@ grep 'hello\.service' /root/list-jobs.txt && exit 1 # TODO: add more job queueing/merging tests here. +# Test for irreversible jobs +systemctl start unstoppable.service || exit 1 + +# This is expected to fail with 'job cancelled' +systemctl stop unstoppable.service && exit 1 +# But this should succeed +systemctl stop --irreversible unstoppable.service || exit 1 + +# We're going to shutdown soon. Let's see if it succeeds when +# there's an active service that tries to be unstoppable. +# Shutdown of the container/VM will hang if not. +systemctl start unstoppable.service || exit 1 + touch /testok exit 0