]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test(16): check for failure after each sub-test run
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 17 Dec 2022 00:34:25 +0000 (00:34 +0000)
committerAntonio Álvarez Feijoo <antonio.feijoo@suse.com>
Mon, 26 Jun 2023 07:37:19 +0000 (09:37 +0200)
The test case had a bug where it only checked for
at least one of the passing instead of all the subtests passing.

test/TEST-16-DMSQUASH/test.sh

index e781263a572417f760c43f35ca42d6da879b2350..1535386d9dd2b6934caec0a7e601e39eb74f5a8a 100755 (executable)
@@ -16,15 +16,21 @@ test_run() {
     "$testdir"/run-qemu \
         "${disk_args[@]}" \
         -boot order=d \
-        -append "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" \
+        -append "rd.live.overlay.overlayfs=1 root=live:/dev/disk/by-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
 
+    test_marker_check || return 1
+
+    test_marker_reset
     "$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
 
+    test_marker_check || return 1
+
+    test_marker_reset
     "$testdir"/run-qemu \
         "${disk_args[@]}" \
         -boot order=d \
@@ -33,6 +39,7 @@ test_run() {
 
     test_marker_check || return 1
 
+    test_marker_reset
     rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]')
     [ "$rootPartitions" -eq 1 ] || return 1