]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: create a config for test test-makeroot test-root
authorJo Zzsi <jozzsicsataban@gmail.com>
Thu, 12 Sep 2024 00:58:19 +0000 (20:58 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 19 Sep 2024 18:46:14 +0000 (14:46 -0400)
27 files changed:
dracut.conf.d/test [new symlink]
dracut.conf.d/test-makeroot [new symlink]
dracut.conf.d/test-root [new symlink]
modules.d/80test-makeroot/module-setup.sh
modules.d/80test-root/module-setup.sh
modules.d/80test/module-setup.sh
test/TEST-01-BASIC/test.sh
test/TEST-02-SYSTEMD/test.sh
test/TEST-03-USR-MOUNT/test.sh
test/TEST-04-FULL-SYSTEMD/test.sh
test/TEST-05-SYSTEMD-INITRD/test.sh
test/TEST-10-RAID/test.sh
test/TEST-11-LVM/test.sh
test/TEST-12-RAID-DEG/test.sh
test/TEST-13-ENC-RAID-LVM/test.sh
test/TEST-14-IMSM/test.sh
test/TEST-15-BTRFSRAID/test.sh
test/TEST-16-DMSQUASH/test.sh
test/TEST-17-LVM-THIN/test.sh
test/TEST-18-UEFI/test.sh
test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/dracut.conf.d/test-makeroot/test-makeroot.conf [new file with mode: 0644]
test/dracut.conf.d/test-root/test-root.conf [new file with mode: 0644]
test/dracut.conf.d/test/test.conf [new file with mode: 0644]
test/test-functions

diff --git a/dracut.conf.d/test b/dracut.conf.d/test
new file mode 120000 (symlink)
index 0000000..f615620
--- /dev/null
@@ -0,0 +1 @@
+../test/dracut.conf.d/test/
\ No newline at end of file
diff --git a/dracut.conf.d/test-makeroot b/dracut.conf.d/test-makeroot
new file mode 120000 (symlink)
index 0000000..12cb4d1
--- /dev/null
@@ -0,0 +1 @@
+../test/dracut.conf.d/test-makeroot/
\ No newline at end of file
diff --git a/dracut.conf.d/test-root b/dracut.conf.d/test-root
new file mode 120000 (symlink)
index 0000000..460d2fe
--- /dev/null
@@ -0,0 +1 @@
+../test/dracut.conf.d/test-root
\ No newline at end of file
index fde8d2219fda66ebdab60e033633ef1ca6ef1e1b..3ee0d00d4e1fc96e9ad380c4b44c876a212d42b4 100755 (executable)
@@ -14,13 +14,6 @@ installkernel() {
 }
 
 install() {
-    # do not compress, do not strip
-    export compress="cat"
-    export do_strip="no"
-    export do_hardlink="no"
-    export early_microcode="no"
-    export hostonly_cmdline="no"
-
     inst_multiple poweroff cp umount sync dd mkfs.ext4
     inst_hook initqueue/finished 01 "$moddir/finished-false.sh"
 }
index 9432957d455623ee9c736ac909f0db4d4b976fe9..d99649056ede6757dc9733b19ce109b0ca0e0cff 100755 (executable)
@@ -14,13 +14,6 @@ depends() {
 }
 
 install() {
-    # do not compress, do not strip
-    export compress="cat"
-    export do_strip="no"
-    export do_hardlink="no"
-    export early_microcode="no"
-    export hostonly_cmdline="no"
-
     inst_simple /etc/os-release
 
     inst_multiple mkdir ln dd stty mount poweroff umount setsid sync cat grep
index a36011ff38b4b6ece1fd90279b6e7ff1f4384fec..16b171c8dd3b309035e0aceb53fd25642b2a3583 100755 (executable)
@@ -22,13 +22,6 @@ installkernel() {
 }
 
 install() {
-    # do not compress, do not strip
-    export compress="cat"
-    export do_strip="no"
-    export do_hardlink="no"
-    export early_microcode="no"
-    export hostonly_cmdline="no"
-
     inst poweroff
     inst_hook shutdown-emergency 000 "$moddir/hard-off.sh"
     inst_hook emergency 000 "$moddir/hard-off.sh"
index c14374a2a435d388e72cfcc32368bb8a147d4af8..99f0c8ee6fb15f7406d982a48b403c5b2c89f2fd 100755 (executable)
@@ -23,7 +23,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -35,7 +35,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -I "mkfs.${TEST_FSTYPE}" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index 5f136bab60a689cdc5d694b6ac255ac802ffe453..2ff5779631e8ac4ac11c0f5de72a44be78e03290 100755 (executable)
@@ -26,7 +26,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -35,7 +35,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir "test-makeroot" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         --nomdadmconf \
         --no-hostonly-cmdline -N \
index 1f2b521c2b542c2c39127a79ec27f0b1e2dcb3bb..48ecd514d08129c127fc82c2f101a05a39e1bf68 100755 (executable)
@@ -41,7 +41,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -i ./fstab /etc/fstab \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
@@ -51,7 +51,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -I "mkfs.btrfs" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index 080bb6b67f044785a93d01b73e4d4c235c3ec4e2..8ca103379f37bdb69e00a3f4101ada388352e01f 100755 (executable)
@@ -62,7 +62,8 @@ test_setup() {
 
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root systemd" \
+        --add-confdir test-root \
+        -a systemd \
         -i "${PKGLIBDIR}/modules.d/80test-root/test-init.sh" "/sbin/test-init.sh" \
         -i ./test-init.sh /sbin/test-init \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
@@ -101,7 +102,8 @@ EOF
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot btrfs crypt" \
+        --add-confdir test-makeroot \
+        -a "btrfs crypt" \
         -I "mkfs.btrfs cryptsetup" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index d52398b6acce89cceb7923756d4429e18955906f..34e6f94657d41a2575c0fb3c4dc96e6225eb2d31 100755 (executable)
@@ -46,7 +46,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -55,7 +55,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         --nomdadmconf \
         --no-hostonly-cmdline -N \
index db0d5a029f11f53aa6177c4c80bdd4df7cf7ad73..2dfac51f52d49bf57cd05b3586bfaae10e1b7c84 100755 (executable)
@@ -25,7 +25,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -33,7 +33,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "bash crypt lvm mdraid" \
         -I "grep cryptsetup" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index ac19aed2f16b55203a547fa812d4bb7b45bca8b5..de531dd28ea12b302ac3745fd99a0de9baf56125 100755 (executable)
@@ -26,7 +26,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -35,7 +35,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "bash lvm mdraid" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
     rm -rf -- "$TESTDIR"/overlay
index b1c11a7ae6aaeca543ce6adfa1e972e2b73b0574..349a915bd7eb044a7488780a80cd96c3b7a408e0 100755 (executable)
@@ -56,7 +56,7 @@ test_run() {
 
 test_setup() {
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -65,7 +65,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "bash crypt lvm mdraid" \
         -I "grep cryptsetup" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index 806e98c2b09670fbd2b2ee6a428f1411ee904de6..ab9ba68f4098b241be3721ac26a9d49c934fa8e8 100755 (executable)
@@ -53,7 +53,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -63,7 +63,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "bash crypt lvm mdraid" \
         -I "grep cryptsetup" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index 594e9ced8c37402ba91376153dd9441d1082844c..ec4a4cc19998b6a0412e652d2d89a6f37884dc9c 100755 (executable)
@@ -55,7 +55,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -64,7 +64,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash lvm mdraid dmraid" \
+        --add-confdir test-makeroot \
+        -a "bash lvm mdraid dmraid" \
         -d "piix ide-gd_mod ata_piix ext4 sd_mod dm-multipath dm-crypt dm-round-robin faulty linear multipath raid0 raid10 raid1 raid456" \
         -I "grep sfdisk realpath" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
index 5624bb31920bd3e34656a8a9644365b7f6e48084..49c1c6d2b2c536d4971ef0fcf27ceb7faaf6b12b 100755 (executable)
@@ -29,7 +29,7 @@ test_setup() {
 
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -38,7 +38,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash btrfs" \
+        --add-confdir test-makeroot \
+        -a "bash btrfs" \
         -d "piix ide-gd_mod ata_piix btrfs sd_mod" \
         -I "mkfs.btrfs" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
index e4bb014d477d79662906be7f28cf1ab6931a4598..0e0a1fab3a50b55229abcf5c8e080925dcafec8b 100755 (executable)
@@ -98,7 +98,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -i ./test-init.sh /sbin/init-persist \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
@@ -108,7 +108,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        --module "test-makeroot" \
+        --add-confdir test-makeroot \
         --install "sfdisk mkfs.ntfs mksquashfs mkfs.erofs" \
         --drivers "ntfs3 erofs" \
         --include ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
index 6e7a0c31d40c4dd7f389d614366bd2ad230247d5..cf26974d045ea8fd5c0e78ee7fb9244b1c55757a 100755 (executable)
@@ -25,7 +25,7 @@ test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
 
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
 
@@ -35,7 +35,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot bash lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "bash lvm mdraid" \
         -I "grep" \
         -i ./create-root.sh /lib/dracut/hooks/initqueue/01-create-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
index b1ee5c174f9e408a92def0cbb768be7b04ec524a..ff383c178190e92f19e07c7328e8c3b0570763c4 100755 (executable)
@@ -58,7 +58,7 @@ test_run() {
 test_setup() {
     # Create what will eventually be our root filesystem
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         "$TESTDIR"/tmp-initramfs.root "$KVERSION" || return 1
 
     mkdir -p "$TESTDIR"/dracut.*/initramfs/proc
index a374b91d7153a27bc4160a3350d58dc639cfec45..9520cd7051c30f7f48e115b4c29adfdb223ee84f 100755 (executable)
@@ -135,7 +135,7 @@ test_check() {
 test_setup() {
     # Create what will eventually be the client root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -I "ip grep setsid" \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*
@@ -147,7 +147,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "crypt lvm mdraid" \
         -I "setsid blockdev" \
         -i ./create-client-root.sh /lib/dracut/hooks/initqueue/01-create-client-root.sh \
         --no-hostonly-cmdline -N \
@@ -171,7 +172,8 @@ test_setup() {
 
     # Create what will eventually be the server root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network-legacy" \
+        --add-confdir test-root \
+        -a network-legacy \
         -d "iscsi_tcp crc32c ipv6" \
         -I "modprobe chmod ip setsid pidof tgtd tgtadm /etc/passwd" \
         --install-optional "/etc/netconfig dhcpd /etc/group /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols /usr/etc/services" \
@@ -187,7 +189,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -i ./create-server-root.sh /lib/dracut/hooks/initqueue/01-create-server-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
     rm -rf -- "$TESTDIR"/overlay
index eae8478d897dec736a5f2738318adec9f975e69c..6849931bd9f0020d221871d2aa04be749e274b67 100755 (executable)
@@ -148,7 +148,7 @@ test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     rm -rf -- "$TESTDIR"/overlay
     "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -I "ip grep setsid" \
         --no-hostonly --no-hostonly-cmdline --nohardlink \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
@@ -161,7 +161,8 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "crypt lvm mdraid" \
         -I "setsid blockdev" \
         -i ./create-client-root.sh /lib/dracut/hooks/initqueue/01-create-client-root.sh \
         --no-hostonly-cmdline -N \
@@ -185,7 +186,8 @@ test_setup() {
 
     rm -rf -- "$TESTDIR"/overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network-legacy iscsi" \
+        --add-confdir test-root \
+        -a "network-legacy iscsi" \
         -d "iscsi_tcp crc32c ipv6 af_packet" \
         -I "ip grep sleep setsid chmod modprobe pidof tgtd tgtadm" \
         --install-optional "/etc/netconfig dhcpd /etc/group /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols /usr/etc/services" \
@@ -202,7 +204,7 @@ test_setup() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -i ./create-server-root.sh /lib/dracut/hooks/initqueue/01-create-server-root.sh \
         -f "$TESTDIR"/initramfs.makeroot "$KVERSION" || return 1
     rm -rf -- "$TESTDIR"/overlay
index 4a168a51dcad5337d936ec64e85f57eba741b9cb..b1ae466ae92bde9da3f8dc57ed88d80c7a31f8e0 100755 (executable)
@@ -190,7 +190,7 @@ make_encrypted_root() {
     rm -fr "$TESTDIR"/overlay
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -I "ip grep" \
         --no-hostonly --no-hostonly-cmdline --nohardlink \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
@@ -202,7 +202,8 @@ make_encrypted_root() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot crypt lvm mdraid" \
+        --add-confdir test-makeroot \
+        -a "crypt lvm mdraid" \
         -I "cryptsetup" \
         -i ./create-encrypted-root.sh /lib/dracut/hooks/initqueue/01-create-encrypted-root.sh \
         --no-hostonly-cmdline -N \
@@ -226,7 +227,7 @@ make_encrypted_root() {
 make_client_root() {
     rm -fr "$TESTDIR"/overlay
     "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root" \
+        --add-confdir test-root \
         -I "ip" \
         --no-hostonly --no-hostonly-cmdline --nohardlink \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
@@ -238,7 +239,7 @@ make_client_root() {
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot" \
+        --add-confdir test-makeroot \
         -i ./create-client-root.sh /lib/dracut/hooks/initqueue/01-create-client-root.sh \
         --nomdadmconf \
         --no-hostonly-cmdline -N \
@@ -274,7 +275,8 @@ bs = 4096
 EOF
 
     "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network-legacy" \
+        --add-confdir test-root \
+        -a "network-legacy" \
         -I "ip grep sleep nbd-server chmod modprobe vi pidof" \
         --install-optional "/etc/netconfig dhcpd /etc/group /etc/nsswitch.conf /etc/rpc /etc/protocols /etc/services /usr/etc/nsswitch.conf /usr/etc/rpc /usr/etc/protocols /usr/etc/services" \
         -i /tmp/config /etc/nbd-server/config \
@@ -291,7 +293,8 @@ EOF
     # We do it this way so that we do not risk trashing the host mdraid
     # devices, volume groups, encrypted partitions, etc.
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -m "test-makeroot network-legacy" \
+        --add-confdir test-makeroot \
+        -a "network-legacy" \
         -i ./create-server-root.sh /lib/dracut/hooks/initqueue/01-create-server-root.sh \
         --nomdadmconf \
         --no-hostonly-cmdline -N \
diff --git a/test/dracut.conf.d/test-makeroot/test-makeroot.conf b/test/dracut.conf.d/test-makeroot/test-makeroot.conf
new file mode 100644 (file)
index 0000000..1cbabcd
--- /dev/null
@@ -0,0 +1,7 @@
+dracutmodules+=" test-makeroot "
+# do not compress, do not strip
+compress="cat"
+do_strip="no"
+do_hardlink="no"
+early_microcode="no"
+hostonly_cmdline="no"
diff --git a/test/dracut.conf.d/test-root/test-root.conf b/test/dracut.conf.d/test-root/test-root.conf
new file mode 100644 (file)
index 0000000..bfd5238
--- /dev/null
@@ -0,0 +1,7 @@
+dracutmodules+=" test-root "
+# do not compress, do not strip
+compress="cat"
+do_strip="no"
+do_hardlink="no"
+early_microcode="no"
+hostonly_cmdline="no"
diff --git a/test/dracut.conf.d/test/test.conf b/test/dracut.conf.d/test/test.conf
new file mode 100644 (file)
index 0000000..6b5e3c1
--- /dev/null
@@ -0,0 +1,7 @@
+add_dracutmodules+=" test "
+# do not compress, do not strip
+compress="cat"
+do_strip="no"
+do_hardlink="no"
+early_microcode="no"
+hostonly_cmdline="no"
index 2d04dd2e34fed80c3301b8fc5078deb209ff3b89..feddd7a193f2b8793da17e49a7a4a4d1782dccb8 100644 (file)
@@ -40,7 +40,7 @@ test_dracut() {
     fi
 
     # pick up configuration from /tmp/dracut.conf.d when running the tests
-    TEST_DRACUT_ARGS+=" --local --confdir /tmp/dracut.conf.d --no-early-microcode --add test --force --kver $KVERSION"
+    TEST_DRACUT_ARGS+=" --local --confdir /tmp/dracut.conf.d --add-confdir test --no-early-microcode --force --kver $KVERSION"
 
     # include $TESTDIR"/overlay if exists
     if [ -d "$TESTDIR"/overlay ]; then