And drop it where not necessary.
# of systemd-analyze blame. See issue #27187.
systemd-analyze blame
-echo OK >/testok
+touch /testok
journalctl --sync
test ! -s /failed
+touch /testok
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
run_subtests
touch /testok
-rm /failed
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
# Issue: https://github.com/systemd/systemd/issues/2730
# See TEST-07-PID1/test.sh for the first "half" of the test
mountpoint /issue2730
run_subtests
touch /testok
-rm /failed
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
run_subtests
touch /testok
-rm /failed
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
udevadm settle
run_subtests
touch /testok
-rm /failed
set -eux
set -o pipefail
-: >/failed
-
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
run_subtests
touch /testok
-rm /failed
systemctl --machine 'testuser@.host' --user daemon-reexec
done
-echo OK >/testok
-
-exit 0
+touch /testok
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
run_subtests
touch /testok
-rm /failed
set -eux
set -o pipefail
-: >/failed
-
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
run_subtests_with_signals SIGUSR1 SIGUSR2 SIGRTMIN+1
touch /testok
-rm /failed
cryptsetup_start_and_check detached_slot{0..1}
cryptsetup_start_and_check -f detached_slot_fail
-echo OK >/testok
+touch /testok
test ! -f /var/lib/machines/scratch5
(! machinectl image-status scratch5)
-echo OK >/testok
-
-exit 0
+touch /testok
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
-: >/failed
-
at_exit() {
if [[ -v UNIT_NAME && -e "/usr/lib/systemd/system/$UNIT_NAME" ]]; then
rm -fvr "/usr/lib/systemd/system/$UNIT_NAME" "/etc/systemd/system/$UNIT_NAME.d" "+4"
systemctl daemon-reload
touch /testok
-rm /failed
res="$(! portablectl attach --extension /tmp/emptyext /tmp/emptyroot 2> >(grep "Remote peer disconnected"))"
test -z "${res}"
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
exit 1
fi
-echo OK >/testok
-exit 0
+touch /testok
systemd-analyze log-level info
fi
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
rm -f "$SCRIPT" "$PAMSERVICE"
}
-: >/failed
-
setup_test_user
test_enable_debug
run_testcases
touch /testok
-rm /failed
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
run_testcases
fi
-echo OK >/testok
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
assert_rc 3 systemctl is-active --quiet systemd-timesyncd
}
-: >/failed
-
run_testcases
touch /testok
-rm /failed
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-dissect --copy-to /tmp/img abc /abc
test -f /tmp/img/abc
-echo OK >/testok
-
-exit 0
+touch /testok
systemctl enable test-honor-first-shutdown.service
systemctl start test-honor-first-shutdown.service
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
test_sector 2048
test_sector 4096
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
done
}
-: >/failed
-
systemd-analyze log-level debug
systemd-analyze log-target journal
systemd-analyze log-level info
touch /testok
-rm /failed
systemctl start --wait testsuite-62-4.service
systemctl start --wait testsuite-62-5.service
-echo OK >/testok
-
-exit 0
+touch /testok
systemctl log-level info
-echo OK >/testok
+touch /testok
helper_check_device_units
}
-: >/failed
-
udevadm settle
udevadm control --log-level debug
lsblk -a
systemctl status systemd-udevd
touch /testok
-rm /failed
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
systemd-analyze log-level info
-echo OK >/testok
-
-exit 0
+touch /testok
separate_data=0
done
-echo OK >/testok
+touch /testok
wait_on_state_or_fail "testservice-failure-exit-handler-68-template@testservice-failure-68-template.service.service" "inactive" "10"
systemd-analyze log-level info
-echo OK >/testok
-exit 0
+touch /testok
(! systemd-cryptenroll --wipe-slot=10240000 "$img")
(! systemd-cryptenroll --fido2-device=auto --unlock-fido2-device=auto "$img")
-echo OK >/testok
-
-exit 0
+touch /testok
(! getent hosts -s myhostname fd00:dead:beef:cafe::1)
}
-: >/failed
-
run_testcases
touch /testok
-rm /failed
rm /var/tmp/72-joined.raw
rm -r /var/tmp/72-{dirs,defs,source,xbootldr,esp}
-echo OK >/testok
-
-exit 0
+touch /testok
localectl set-locale en_US.UTF-8
}
-: >/failed
-
# Make sure the content of kbd-model-map is the one that the tests expect
# regardless of the version installed on the distro where the testsuite is
# running on.
run_testcases
touch /testok
-rm /failed
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
run_subtests
touch /testok
-rm /failed
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
-: >/failed
-
RUN_OUT="$(mktemp)"
run() {
fi
touch /testok
-rm /failed
systemctl stop $UNIT
systemd-analyze log-level info
-echo OK >/testok
-exit 0
+touch /testok
rm "$SCRIPT"
systemd-analyze log-level info
-echo OK >/testok
-exit 0
+touch /testok
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
-: >/failed
-
mkfifo /tmp/syncfifo1 /tmp/syncfifo2
sync_in() {
assert_eq "$(systemctl show fdstore-nopin.service -P SubState)" dead
touch /testok
-rm /failed
-
-exit 0
# shellcheck source=test/units/test-control.sh
. "$(dirname "$0")"/test-control.sh
-: >/failed
-
run_subtests
touch /testok
-rm /failed
fi
systemd-analyze log-level info
-echo OK >/testok
+touch /testok
systemctl --no-block poweroff
-
-exit 0