summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2013-01-25 19:49:19 +0100
committerMichal Schmidt <mschmidt@redhat.com>2013-01-25 22:29:55 +0100
commite8a66f4af296dc1dd4879a1401eb42bf7b7aeb01 (patch)
tree4f1470710363c3353f9c12d3e3f6cdb95f30d090
parentb44be3ecf6326c27aa2c6c6d1fe34e22e22592a0 (diff)
test: use non-blocking systemctl calls in testsuite.service
"systemctl poweroff" called from testsuite.service will cause this unit itself to stop. To avoid deadlock, the call must not be synchronous.
-rwxr-xr-xtest/TEST-01-BASIC/test.sh2
-rwxr-xr-xtest/TEST-02-CRYPTSETUP/test.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
index eb6a80a07c..9ab0a6fce9 100755
--- a/test/TEST-01-BASIC/test.sh
+++ b/test/TEST-01-BASIC/test.sh
@@ -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
diff --git a/test/TEST-02-CRYPTSETUP/test.sh b/test/TEST-02-CRYPTSETUP/test.sh
index 790dc3074c..a0e4d6580d 100755
--- a/test/TEST-02-CRYPTSETUP/test.sh
+++ b/test/TEST-02-CRYPTSETUP/test.sh
@@ -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