]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(FULL-SYSTEMD): remove /etc/fstab from the rootfs
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 6 Jul 2024 17:53:42 +0000 (13:53 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Sun, 7 Jul 2024 13:52:13 +0000 (09:52 -0400)
This PR moves /usr mounting into initrd instead of after
switch_root.

This PR makes the test more generic and allow more testcases.

test/TEST-04-FULL-SYSTEMD/fstab [deleted file]
test/TEST-04-FULL-SYSTEMD/test.sh

diff --git a/test/TEST-04-FULL-SYSTEMD/fstab b/test/TEST-04-FULL-SYSTEMD/fstab
deleted file mode 100644 (file)
index 114f945..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root  /                       btrfs   defaults         0 0
-/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_usr   /usr                    btrfs   subvol=usr,ro    0 0
index 31dd704437225d25a86a76fa3b584b74000f71fe..fba9b5d0453cd49f390c99f0829bb6de4afade3e 100755 (executable)
@@ -28,7 +28,7 @@ client_run() {
     test_marker_reset
     "$testdir"/run-qemu \
         "${disk_args[@]}" \
-        -append "$TEST_KERNEL_CMDLINE systemd.unit=testsuite.target systemd.mask=systemd-firstboot systemd.mask=systemd-vconsole-setup rd.multipath=0 root=LABEL=dracut $client_opts rd.retry=3 $DEBUGOUT" \
+        -append "$TEST_KERNEL_CMDLINE systemd.unit=testsuite.target systemd.mask=systemd-firstboot systemd.mask=systemd-vconsole-setup rd.multipath=0 root=LABEL=dracut mount.usr=LABEL=dracutusr mount.usrfstype=btrfs mount.usrflags=subvol=usr,ro $client_opts rd.retry=3 $DEBUGOUT" \
         -initrd "$TESTDIR"/initramfs.testing || return 1
 
     if ! test_marker_check; then
@@ -61,7 +61,6 @@ test_setup() {
         -i "${PKGLIBDIR}/modules.d/80test-root/test-init.sh" "/sbin/test-init.sh" \
         -i ./test-init.sh /sbin/test-init \
         -I "findmnt" \
-        -i ./fstab /etc/fstab \
         -f "$TESTDIR"/initramfs.root "$KVERSION" || return 1
 
     mkdir -p "$TESTDIR"/overlay/source && cp -a "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.* && export initdir=$TESTDIR/overlay/source