From: Laszlo Gombos Date: Mon, 15 Aug 2022 19:45:09 +0000 (+0000) Subject: test(DMSQUASH): add test for overlay on top of a block device X-Git-Tag: 058~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=027eee902d0d7af4db45fcb7835d49990c9fafa1;p=thirdparty%2Fdracut.git test(DMSQUASH): add test for overlay on top of a block device Add a test for mounting root filesystem with overlay for /dev/sdb. The existing test was testing mounting root filesystem with overlay from a squashfs image file. --- diff --git a/test/TEST-16-DMSQUASH/create-root.sh b/test/TEST-16-DMSQUASH/create-root.sh index 9bc1aa5dc..0a68c1fbc 100755 --- a/test/TEST-16-DMSQUASH/create-root.sh +++ b/test/TEST-16-DMSQUASH/create-root.sh @@ -15,6 +15,7 @@ mkfs.ext4 -q -L dracut /dev/disk/by-id/ata-disk_root mkdir -p /root mount /dev/disk/by-id/ata-disk_root /root mkdir -p /root/run /root/testdir +cp -a -t /root /source/* echo "Creating squashfs" mksquashfs /source /root/testdir/rootfs.img -quiet umount /root diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh index 520293754..f02d615b7 100755 --- a/test/TEST-16-DMSQUASH/test.sh +++ b/test/TEST-16-DMSQUASH/test.sh @@ -16,6 +16,12 @@ test_run() { qemu_add_drive_args disk_index disk_args "$TESTDIR"/marker.img marker qemu_add_drive_args disk_index disk_args "$TESTDIR"/root.img root + "$testdir"/run-qemu \ + "${disk_args[@]}" \ + -boot order=d \ + -append "rd.live.image rd.live.overlay.overlayfs=1 root=LABEL=dracut console=ttyS0,115200n81 quiet selinux=0 rd.info rd.shell=0 panic=1 oops=panic softlockup_panic=1 $DEBUGFAIL" \ + -initrd "$TESTDIR"/initramfs.testing + "$testdir"/run-qemu \ "${disk_args[@]}" \ -boot order=d \ @@ -103,7 +109,7 @@ test_setup() { export initdir="$TESTDIR"/overlay # shellcheck disable=SC1090 . "$basedir"/dracut-init.sh - inst_multiple poweroff shutdown mkfs.ext4 find + inst_multiple poweroff shutdown mkfs.ext4 inst_hook shutdown-emergency 000 ./hard-off.sh inst_hook emergency 000 ./hard-off.sh )