]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Disable LUKS devices from initramfs in QEMU tests
authorFilipe Brandenburger <filbranden@gmail.com>
Wed, 13 Nov 2019 18:46:08 +0000 (10:46 -0800)
committerFilipe Brandenburger <filbranden@gmail.com>
Thu, 14 Nov 2019 03:55:18 +0000 (19:55 -0800)
We currently use the host's kernel and initramfs in our QEMU tests.

If the host is running on an encrypted LUKS partition, then the initramfs
will have a crypttab setup looking for the particular root disk it needs to
encrypt before booting into the system.

However, this disk obviously doesn't exist in our QEMU VM, so it turns out
our tests end up waiting for this device to become available, which will
never actually happen, and boot hangs for 90s until that service times out.

[***   ] A start job is running for /dev/disk/by-uuid/01234567-abcd-1234-abcd-0123456789ab (20s / 1min 30s)

In order to prevent this issue, let's pass "rd.luks=0" to disable LUKS in
the initramfs only as part of our default kernel command-line in our QEMU
tests.

This is enough to disable this behavior and prevent the timeout, while at
the same time doesn't conflict with our tests that actually check for LUKS
behavior in the systemd running under test (such as TEST-02-CRYPTSETUP).

Tested: `sudo make -C TEST-02-CRYPTSETUP/ clean setup run`

test/test-functions

index 3afc3241106ef8491e83d1f80586722d80d9024d..25a7b9b6f5ab489d79b3587d325d1ff619fb8a12 100644 (file)
@@ -207,6 +207,7 @@ run_qemu() {
     KERNEL_APPEND="$PARAMS \
 root=/dev/sda1 \
 raid=noautodetect \
+rd.luks=0 \
 loglevel=2 \
 init=$PATH_TO_INIT \
 console=$CONSOLE \