]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make TEST-86-MULTI-PROFILE-UKI robust against reruns 41922/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 15:33:38 +0000 (16:33 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 17:08:33 +0000 (18:08 +0100)
When qemu reboots instead of shutting down after the last iteration,
the profile is already set to profile2 but the /root/encrypted.raw is
gone so the test fails. Reset the default boot entry at the end of the
test to make it robust against reruns.

Fixes https://github.com/systemd/systemd/issues/39553

test/units/TEST-86-MULTI-PROFILE-UKI.sh

index 5518cb656149f2ece7505315762c666f12dbd305..72fb7b6f554af8d3d5f9daf99f5c4fcb14908c8b 100755 (executable)
@@ -64,6 +64,9 @@ elif [[ "$ID" == "profile1" ]]; then
 elif [[ "$ID" == "profile2" ]]; then
     grep testprofile2=1 /proc/cmdline
     rm /root/encrypted.raw
+    # Reset the default boot entry so a subsequent re-run of the test does not
+    # boot straight back into @profile2 (where encrypted.raw is now gone) and fail.
+    bootctl set-default ""
 else
     exit 1
 fi