From: Nadzeya Hutsko Date: Thu, 22 Jan 2026 11:54:13 +0000 (+0100) Subject: fix(test/DMSQUASH): zero overlay partition on reset X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2335fbd610d5918bb178da6b70d8617d3e44d5;p=thirdparty%2Fdracut-ng.git fix(test/DMSQUASH): zero overlay partition on reset The reset_overlay_partition function was not fully clearing the overlay partition. Delete the partition from the partition table and zero out the disk region to ensure a clean state between test runs. --- diff --git a/test/TEST-30-DMSQUASH/test.sh b/test/TEST-30-DMSQUASH/test.sh index 0b5ef316e..d5d85b244 100755 --- a/test/TEST-30-DMSQUASH/test.sh +++ b/test/TEST-30-DMSQUASH/test.sh @@ -60,6 +60,8 @@ check_autooverlay_marker() { # Reset root.img to single partition state for autooverlay test reset_overlay_partition() { test_marker_reset + sfdisk --delete "$TESTDIR"/root.img 2 2> /dev/null || true + dd if=/dev/zero of="$TESTDIR"/root.img bs=1M seek=320 count=50 conv=notrunc status=none local rootPartitions rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]') [ "$rootPartitions" -eq 1 ]