]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(USR-MOUNT): add a test run for mounting btrfs subvolume rw
authorJo Zzsi <jozzsicsataban@gmail.com>
Sun, 7 Sep 2025 02:44:01 +0000 (22:44 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Sun, 7 Sep 2025 04:24:28 +0000 (00:24 -0400)
Add a test run for mounting top btrfs root volume readonly
and writeable /usr.

test/TEST-11-USR-MOUNT/test.sh

index 1cf2a724ddaf7d03ed772868bbbe70e96b2fa9dc..4b5c51697212bb06e83ab8866c7101e5c3805e7c 100755 (executable)
@@ -41,15 +41,16 @@ client_run() {
 
 test_run() {
     client_run "no option specified"
-    client_run "readonly root" "ro"
-    client_run "writeable root" "rw"
+    client_run "readonly root and writeable /usr" "ro"
+    client_run "writeable root and /usr" "rw"
+    client_run "readonly root and /usr" "ro rd.fstab=0"
 }
 
 test_setup() {
     # Create what will eventually be our root filesystem onto an overlay
     "$DRACUT" -N --keep --tmpdir "$TESTDIR" \
         --add-confdir test-root \
-        --mount "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root /usr btrfs subvol=usr,ro" \
+        --mount "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root /usr btrfs subvol=usr,rw" \
         -f "$TESTDIR"/initramfs.root
     mkdir -p "$TESTDIR"/overlay/source && mv "$TESTDIR"/dracut.*/initramfs/* "$TESTDIR"/overlay/source && rm -rf "$TESTDIR"/dracut.*