mirror of
https://github.com/systemd/systemd
synced 2024-10-14 12:04:49 +00:00
test: skip TEST-08-INITRD if systemd didn't run in the initrd
This test requires systemd in the initrd, which is not the case in mkinitrd-based initrds (Ubuntu/Debian). Resolves: #30481
This commit is contained in:
parent
1905d621db
commit
57d61ff319
|
@ -44,8 +44,13 @@ EOF
|
|||
}
|
||||
|
||||
check_result_qemu_hook() {
|
||||
local workspace="${1:?}"
|
||||
local console_log="${TESTDIR:?}/console.log"
|
||||
|
||||
if [[ -e "$workspace/skipped" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ ! -e "$console_log" ]]; then
|
||||
dfatal "Missing console log - this shouldn't happen"
|
||||
return 1
|
||||
|
|
|
@ -8,6 +8,14 @@ if systemd-detect-virt -qc; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# This test requires systemd to run in the initrd as well, which is not the case
|
||||
# for mkinitrd-based initrd (Ubuntu/Debian)
|
||||
if [[ "$(systemctl show -P InitRDTimestampMonotonic)" -eq 0 ]]; then
|
||||
echo "systemd didn't run in the initrd, skipping the test"
|
||||
touch /skipped
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# We should've created a mount under /run in initrd (see the other half of the test)
|
||||
# that should've survived the transition from initrd to the real system
|
||||
test -d /run/initrd-mount-target
|
||||
|
|
Loading…
Reference in a new issue