+++ /dev/null
-all setup run clean clean-again:
- @TEST_BASE_DIR=../ ./test.sh --$@
-
-# finish option is used to run checks that can only be run outside of
-# the test execution. Example case, honor first shutdown, proof is obtained
-# from the console output as the image shuts down. This does not show up in
-# the journal so the output from the do_test is captured in a file in /tmp.
-# Without the use of finish the test will still pass because if it fails
-# the test will loop and will be terminated via a command timeout.
-# This just provides concrete confirmation.
-finish:
- @TEST_BASE_DIR=../ ./fini.sh --$@
-
-.PHONY: all setup run clean clean-again finish
--- /dev/null
+../TEST-01-BASIC/Makefile
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-TEST_DESCRIPTION="test honor first shutdown"
-
-if grep -q "Shutdown is already active. Skipping emergency action request" /tmp/honorfirstshutdown.log; then
- echo "$TEST_DESCRIPTION [pass]"
- exit 0
-else
- echo "$TEST_DESCRIPTION [fail]"
- exit 1
-fi
# only found from the console during the poweroff.
rm -f /tmp/honorfirstshutdown.log >/dev/null
-do_test "$@" 52 >/tmp/honorfirstshutdown.log
+check_result_nspawn_hook() {
+ grep -q "Shutdown is already active. Skipping emergency action request" /tmp/honorfirstshutdown.log
+}
+
+# Note: don't use a pipe in the following expression, as it breaks the trap
+# handlers we have defined in test/test-functions.
+do_test "$@" > >(tee /tmp/honorfirstshutdown.log)
After=multi-user.target
[Service]
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+ExecStart=/usr/lib/systemd/tests/testdata/testsuite-52.units/%N.sh
ExecStop=sh -c 'kill -KILL $MAINPID'
FailureAction=reboot
Description=Testsuite service
[Service]
-ExecStart=/usr/lib/systemd/tests/testdata/%N.units/%N.sh
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
Type=oneshot
set -ex
set -o pipefail
-if ! test -x /usr/lib/systemd/tests/testdata/units/test-honor-first-shutdown.sh ; then
- echo "honor-first-shutdown script not found - FAIL" >/testok
- exit 0
-fi
-
systemd-analyze log-level debug
systemd-analyze log-target console