]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(DMSQUASH): use test_marker_check
authorBenjamin Drung <benjamin.drung@canonical.com>
Thu, 15 Jan 2026 12:55:50 +0000 (13:55 +0100)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Thu, 15 Jan 2026 15:41:24 +0000 (10:41 -0500)
Use `test_marker_check` to shorten the test case code.

test/TEST-30-DMSQUASH/test.sh

index 8108317ecc9dc17d614fd50d8df63fd2f14977bc..934a84ab60b186091450c2223b70fa7fc5149bd7 100755 (executable)
@@ -67,15 +67,8 @@ test_run() {
 
     rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]')
     [ "$rootPartitions" -eq 2 ]
-
-    (
-        # Ensure that this test works when run with the `V=1` parameter, which runs the script with `set -o pipefail`.
-        set +o pipefail
-
-        # Verify that the string "dracut-autooverlay-success" occurs in the second partition in the image file.
-        dd if="$TESTDIR"/root.img bs=1M status=none \
-            | grep -F -a -m 1 -q dracut-autooverlay-success
-    )
+    # Verify that the string "dracut-autooverlay-success" occurs in the second partition in the image file.
+    test_marker_check dracut-autooverlay-success root.img
 
     return 0
 }