mirror of
https://github.com/systemd/systemd
synced 2024-10-01 13:55:20 +00:00
TEST-08-INITRD: Fix result check
This commit is contained in:
parent
1f225d4ef1
commit
c2172400d7
|
@ -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
|
||||
|
||||
|
|
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue