]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: use use --add instead of --modules to create test-makeroot
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Mon, 1 Jul 2024 12:58:31 +0000 (08:58 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 2 Jul 2024 08:50:31 +0000 (04:50 -0400)
Use USE_NETWORK instead of network to be able to control the
network dracut module from outside of the tests.

test/TEST-20-NFS/test.sh
test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/test.sh
test/TEST-40-NBD/test.sh
test/TEST-50-MULTINIC/test.sh

index 6ab5a7da2bf2195ac970ff213fc3247b6c04bb6d..617c76cb35c802a3851fd0d9c1ccfaa30bda60fa 100755 (executable)
@@ -416,7 +416,7 @@ test_setup() {
     )
     # Make server's dracut image
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -a "bash rootfs-block debug kernel-modules watchdog qemu network" \
+        -a "bash rootfs-block debug kernel-modules watchdog qemu ${USE_NETWORK}" \
         -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod e1000 i6300esb" \
         --no-hostonly-cmdline -N \
         -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1
index ff29fdecb1ccd8766f08edb06c10a85ad04c553f..dc4997e567a6f948486bce9b5faf769c8bc572c3 100755 (executable)
@@ -173,7 +173,7 @@ test_setup() {
 
     # Create what will eventually be the server root filesystem onto an overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network" \
+        -m "test-root ${USE_NETWORK}" \
         -d "iscsi_tcp crc32c ipv6" \
         -i "${PKGLIBDIR}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
         -i "${PKGLIBDIR}/modules.d/99base/dracut-dev-lib.sh" "/lib/dracut-dev-lib.sh" \
@@ -213,7 +213,7 @@ test_setup() {
 
     # Make server's dracut image
     "$DRACUT" -l \
-        -a "dash rootfs-block test kernel-modules network" \
+        -a "dash rootfs-block test kernel-modules ${USE_NETWORK}" \
         -d "piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg virtio_pci virtio_scsi" \
         -i "./server.link" "/etc/systemd/network/01-server.link" \
         -i ./wait-if-server.sh /lib/dracut/hooks/pre-mount/99-wait-if-server.sh \
index 25116394eeaeba98f60c734e72c8fd4c2c151bcc..7c33e6a49993a91ec9bd6895dea19ab1344033ba 100755 (executable)
@@ -187,7 +187,7 @@ test_setup() {
 
     rm -rf -- "$TESTDIR"/overlay
     "$DRACUT" -N -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network iscsi" \
+        -m "test-root ${USE_NETWORK} iscsi" \
         -d "iscsi_tcp crc32c ipv6 af_packet" \
         -I "ip grep sleep setsid chmod modprobe pidof tgtd tgtadm" \
         -i "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
@@ -233,7 +233,7 @@ test_setup() {
 
     # Make server's dracut image
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -a "test dash rootfs-block debug kernel-modules network" \
+        -a "test dash rootfs-block debug kernel-modules ${USE_NETWORK}" \
         -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg" \
         -i "./server.link" "/etc/systemd/network/01-server.link" \
         -i "./wait-if-server.sh" "/lib/dracut/hooks/pre-mount/99-wait-if-server.sh" \
index 5e83ca3acdfab29060c1eb992e18e234741f5c54..9e6e3908e50af38589da8b1c235da9059a641a3f 100755 (executable)
@@ -278,7 +278,7 @@ bs = 4096
 EOF
 
     "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
-        -m "test-root network" \
+        -a "test-root ${USE_NETWORK}" \
         -d "nfsd sunrpc ipv6 lockd af_packet 8021q ipvlan macvlan" \
         -I "ip grep sleep nbd-server chmod modprobe vi pidof" \
         -i "${basedir}/modules.d/99base/dracut-lib.sh" "/lib/dracut-lib.sh" \
@@ -299,7 +299,7 @@ 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 / \
-        -a "test-makeroot" \
+        -a "test-makeroot ${USE_NETWORK}" \
         -i ./create-server-root.sh /lib/dracut/hooks/initqueue/01-create-server-root.sh \
         --nomdadmconf \
         --no-hostonly-cmdline -N \
@@ -342,7 +342,7 @@ test_setup() {
         "$TESTDIR"/initramfs.testing
 
     "$DRACUT" -N -l -i "$TESTDIR"/overlay / \
-        -a "test rootfs-block debug kernel-modules network" \
+        -a "test rootfs-block debug kernel-modules ${USE_NETWORK}" \
         -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod e1000 drbg" \
         -i "./server.link" "/etc/systemd/network/01-server.link" \
         -i "./wait-if-server.sh" "/lib/dracut/hooks/pre-mount/99-wait-if-server.sh" \
index 28394320db66bae05d49186ca1a5a82ee54a6c3b..f50794b6d1b61845906e0a5d80319a4abf9c93c3 100755 (executable)
@@ -355,7 +355,7 @@ test_setup() {
     )
     # Make server's dracut image
     "$DRACUT" -l -i "$TESTDIR"/overlay / \
-        -m "bash rootfs-block debug kernel-modules watchdog qemu network" \
+        -m "bash rootfs-block debug kernel-modules watchdog qemu ${USE_NETWORK}" \
         -d "af_packet piix ide-gd_mod ata_piix ext4 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb" \
         --no-hostonly-cmdline -N \
         -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1