]> git.ipfire.org Git - thirdparty/systemd.git/commit
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)
commit14e0259b499c188de09040f2e5857a0193094d5a
treef433292c7f4cdbdcee796afc38444cfa8c2a262a
parent2f2b28ab35e80855042c69e324feaf7418636aa2
test: Disable LUKS devices from initramfs in QEMU tests

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