Instead of relying on the post-test /failed file check.
# Collect failed units & do one daemon-reload to a basic sanity check
systemctl --state=failed --no-legend --no-pager | tee /failed
+test ! -s /failed
systemctl daemon-reload
# Check that the early setup is actually skipped on reexec.
mapfile -t TEST_LIST < <(find /usr/lib/systemd/tests/unit-tests/ -maxdepth 1 -type f -name "${TESTS_GLOB}")
# Reset state
-rm -fv /failed-tests /skipped-tests /skipped
+rm -fv /failed /skipped /testok
if ! systemd-detect-virt -qc; then
# Make sure ping works for unprivileged users (for test-bpf-firewall)
# Test logs are sometimes lost, as the system shuts down immediately after
journalctl --sync
-exit 0
+test ! -s /failed