From: Luca Boccassi Date: Thu, 6 Nov 2025 17:13:16 +0000 (+0000) Subject: test: ensure test checking status runs first X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a62cbfc6d1ca687ac5bceb63356ae1faf34be1e;p=thirdparty%2Fsystemd.git test: ensure test checking status runs first The test messes a bit with the ESP, which might cause bootctl status output to change. Run the test that simply checks status without changing anything first. [ 188.633908] TEST-87-AUX-UTILS-VM.sh[1101]: + bootctl status --quiet [ 188.681082] TEST-87-AUX-UTILS-VM.sh[1155]: System: [ 188.681082] TEST-87-AUX-UTILS-VM.sh[1155]: Firmware: UEFI 2.70 (EDK II 1.00) [ 188.681082] TEST-87-AUX-UTILS-VM.sh[1155]: Firmware Arch: x64 [ 188.681082] TEST-87-AUX-UTILS-VM.sh[1155]: Secure Boot: enabled (user) <...> [ 198.938717] TEST-87-AUX-UTILS-VM.sh[1679]: ++ printf '\6\0\0\0\1' [ 198.939235] TEST-87-AUX-UTILS-VM.sh[1678]: + cmp /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c /dev/fd/63 [ 198.944957] TEST-87-AUX-UTILS-VM.sh[1678]: + cmp /sys/firmware/efi/efivars/SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c /dev/fd/63 [ 198.945808] TEST-87-AUX-UTILS-VM.sh[1681]: ++ printf '\6\0\0\0\0' [ 198.950459] TEST-87-AUX-UTILS-VM.sh[1684]: + bootctl status [ 198.951357] TEST-87-AUX-UTILS-VM.sh[1685]: + grep -q 'Secure Boot: enabled' [ 199.004142] TEST-87-AUX-UTILS-VM.sh[1086]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-87-AUX-UTILS-VM.bootctl.sh failed' Follow-up for 5ae58ac2b93a4046fbae4e0c825b8cc9d03d10d8 Fixes https://github.com/systemd/systemd/issues/39598 --- diff --git a/test/units/TEST-87-AUX-UTILS-VM.bootctl.sh b/test/units/TEST-87-AUX-UTILS-VM.bootctl.sh index c8e3da09cf6..f615facb536 100755 --- a/test/units/TEST-87-AUX-UTILS-VM.bootctl.sh +++ b/test/units/TEST-87-AUX-UTILS-VM.bootctl.sh @@ -346,7 +346,8 @@ EOF bootctl remove } -testcase_secureboot() { +# Order this first, as other test cases mess with the ESP and might break 'bootctl status' output +testcase_00_secureboot() { if [ ! -d /sys/firmware/efi ]; then echo "Not booted with EFI, skipping secureboot tests." return 0