test: make TEST-86-MULTI-PROFILE-UKI robust against reruns

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
This commit is contained in:
Luca Boccassi
2026-05-03 18:08:33 +01:00
parent 2fc008b9e4
commit 3ec1a8ab22
+3
View File
@@ -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