TEST-08-INITRD: Fix result check

This commit is contained in:
Daan De Meyer 2024-05-15 12:32:57 +02:00
parent 1f225d4ef1
commit c2172400d7
2 changed files with 5 additions and 5 deletions

View file

@ -65,13 +65,13 @@ check_result_qemu_hook() {
# [ 6.245955] systemd-shutdown[1]: Failed to switch root to "/run/initramfs": Invalid argument
if grep -qE "systemd-shutdown.+: Failed to move /run/initramfs" "$console_log" ||
grep -qE "systemd-shutdown.+: Failed to switch root" "$console_log"; then
derror "sd-shutdown failed to switch root in shutdown initrd"
derror "sd-shutdown failed to switch root in exitrd"
return 1
fi
# Check if the shutdown initrd was executed at all
if ! grep -q "Hello from shutdown initrd" "$console_log"; then
derror "Missing 'hello' message from shutdown initrd"
# Check if the exitrd was executed at all
if ! grep -q "Hello from exitrd" "$console_log"; then
derror "Missing 'hello' message from exitrd"
return 1
fi

View file

@ -22,7 +22,7 @@ test -d /run/initrd-mount-target
mountpoint /run/initrd-mount-target
[[ -e /run/initrd-mount-target/hello-world ]]
# Copy the prepared shutdown initrd to its intended location. Check the respective
# Copy the prepared exitrd to its intended location. Check the respective
# test.sh file for details
mkdir -p /run/initramfs
cp -r /exitrd/* /run/initramfs/