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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user