]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: run all tests with --no-hostonly-cmdline main
authorBenjamin Drung <benjamin.drung@canonical.com>
Fri, 10 Apr 2026 10:13:47 +0000 (12:13 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Fri, 10 Apr 2026 11:57:42 +0000 (07:57 -0400)
Several tests fail in a Ubuntu VM after commit 04af3c097797 enabled
`hostonly_cmdline` in hostonly mode again, because the host disks leak
into the `cmdline` config stored in the initrd. See 8c70c5bf99ea
("test(sysroot): run with --no-hostonly-cmdline") for a more detailed
explanation.

So run all tests with `--no-hostonly-cmdline`.

dracut.conf.d/test/test.conf
test/TEST-13-SYSROOT/test.sh
test/TEST-40-SYSTEMD/test.sh
test/TEST-45-SYSTEMD-IMPORT/test.sh

index c2e0f395ac62da8bf61138effc77af43a84f8945..3c84fdc6a7ab5531952347f32538c61dc4a3f391 100644 (file)
@@ -1,4 +1,5 @@
 add_dracutmodules+=" qemu "
+hostonly_cmdline="no"
 
 # test the dlopen dependencies support
 add_dlopen_features+=" libsystemd-shared-*.so:fido2 "
index d82a16cb1d9a7c5e6467db66352b8915ce4c8a6d..3002ade46a0d880130ffc0729ee8eebdd7380bdd 100755 (executable)
@@ -23,7 +23,7 @@ test_setup() {
     build_ext4_image "$TESTDIR/rootfs" "$TESTDIR"/root.img dracut
 
     ln -s / "$TESTDIR"/sysroot
-    test_dracut --keep --hostonly --no-hostonly-cmdline --sysroot "$TESTDIR"/sysroot
+    test_dracut --keep --hostonly --sysroot "$TESTDIR"/sysroot
 
     if grep -q '^root:' /etc/shadow; then
         if ! grep -q '^root:' "$TESTDIR"/initrd/dracut.*/initramfs/etc/shadow; then
index 2c1544a2b6347ee5896817e10dcdaa0c5e8c2e5a..bbec030d2f770bad619c215ce91f4347601c0ee5 100755 (executable)
@@ -38,7 +38,6 @@ test_setup() {
     #make sure --omit-drivers does not filter out drivers using regexp to test for an earlier regression (assuming there is no one letter linux kernel module needed to run the test)
 
     test_dracut \
-        --no-hostonly-cmdline \
         --omit "fido2 initqueue" \
         --omit-drivers 'a b c d e f g h i j k l m n o p q r s t u v w x y z' \
         -I systemd-analyze \
index 48e80fdef10d48a7c0b0997f7315f9f386ca8101..8de752c1d299e190bc20f22fcb0464cf8090cbef 100755 (executable)
@@ -120,7 +120,6 @@ test_setup() {
         network_handler="systemd-networkd"
     fi
     test_dracut \
-        --no-hostonly-cmdline \
         "${local_pubring[@]}" \
         -a "systemd-import $network_handler"
 }