chiark / gitweb /
test: use non-blocking systemctl calls in testsuite.service
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 25 Jan 2013 18:49:19 +0000 (19:49 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 25 Jan 2013 21:29:55 +0000 (22:29 +0100)
"systemctl poweroff" called from testsuite.service will cause this unit
itself to stop. To avoid deadlock, the call must not be synchronous.

test/TEST-01-BASIC/test.sh
test/TEST-02-CRYPTSETUP/test.sh

index eb6a80a07c8e1737548101041894093af4c83e63..9ab0a6fce9fa1405a53ede911ce05eccb0c720a8 100755 (executable)
@@ -141,7 +141,7 @@ After=multi-user.target
 
 [Service]
 ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok; while : ;do echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
-ExecStopPost=/usr/bin/systemctl poweroff
+ExecStopPost=/usr/bin/systemctl poweroff --no-block
 Type=oneshot
 EOF
         mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
index 790dc3074cac15a04621e2e4e1dcb6d531b3d252..a0e4d6580d0cf9083d41c4b581f8c8c24af8fa1a 100755 (executable)
@@ -140,7 +140,7 @@ After=multi-user.target
 
 [Service]
 ExecStart=/bin/bash -c 'set -x; systemctl --failed --no-legend --no-pager > /failed ; echo OK > /testok; while : ;do systemd-cat echo "testsuite service waiting for /var/log/journal" ; echo "testsuite service waiting for journal to move to /var/log/journal" > /dev/console ; for i in /var/log/journal/*;do [ -d "\$i" ] && echo "\$i" && break 2; done; sleep 1; done; sleep 1; exit 0;'
-ExecStopPost=/usr/bin/systemctl poweroff
+ExecStopPost=/usr/bin/systemctl poweroff --no-block
 Type=oneshot
 EOF
         mkdir -p $initdir/etc/systemd/system/testsuite.target.wants