cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0035-tests-add-udevadm-settle-to-loop-overlap-test.patch

d8d8bc
From 723438ad02928d9614439def99b36e0758f62d26 Mon Sep 17 00:00:00 2001
d8d8bc
From: Karel Zak <kzak@redhat.com>
d8d8bc
Date: Fri, 12 Aug 2022 08:30:49 +0200
d8d8bc
Subject: tests: add udevadm settle to loop overlap test
d8d8bc
d8d8bc
Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2117203
d8d8bc
Signed-off-by: Karel Zak <kzak@redhat.com>
d8d8bc
---
d8d8bc
 tests/ts/libmount/loop-overlay | 7 +++++++
d8d8bc
 1 file changed, 7 insertions(+)
d8d8bc
d8d8bc
diff --git a/tests/ts/libmount/loop-overlay b/tests/ts/libmount/loop-overlay
d8d8bc
index 62874a182..c27f60d0f 100755
d8d8bc
--- a/tests/ts/libmount/loop-overlay
d8d8bc
+++ b/tests/ts/libmount/loop-overlay
d8d8bc
@@ -43,22 +43,29 @@ dd if="$IMG" of="$IMG" oflag=append bs=1024k count=5 conv=notrunc &>/dev/null
d8d8bc
 
d8d8bc
 echo "second should fail" >>$TS_OUTPUT
d8d8bc
 $TS_CMD_MOUNT -oloop "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
+udevadm settle
d8d8bc
 $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \
d8d8bc
        | sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
d8d8bc
 $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
+udevadm settle
d8d8bc
 
d8d8bc
 echo "should succeed" >>$TS_OUTPUT
d8d8bc
 $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
+udevadm settle
d8d8bc
 $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
+udevadm settle
d8d8bc
 $TS_CMD_UMOUNT "$TS_MOUNTPOINT-1" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
 $TS_CMD_UMOUNT "$TS_MOUNTPOINT-2" >> $TS_OUTPUT 2>> $TS_ERRLOG
d8d8bc
+udevadm settle
d8d8bc
 
d8d8bc
 echo "both should fail" >>$TS_OUTPUT
d8d8bc
 LOOPDEV=$($TS_CMD_LOSETUP --show -f --offset 1 --sizelimit $OFFSET "$IMG")
d8d8bc
+udevadm settle
d8d8bc
 $TS_CMD_MOUNT -oloop,sizelimit=$OFFSET "$IMG" "$TS_MOUNTPOINT-1" 2>&1 \
d8d8bc
 	| sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
d8d8bc
 $TS_CMD_MOUNT -oloop,offset=$OFFSET "$IMG" "$TS_MOUNTPOINT-2" 2>&1 \
d8d8bc
 	| sed 's/:.*:/: <target>/; s/for .*/for <source>/' >> $TS_OUTPUT
d8d8bc
+udevadm settle
d8d8bc
 $TS_CMD_LOSETUP --detach $LOOPDEV
d8d8bc
 
d8d8bc
 ts_log "Success"
d8d8bc
-- 
d8d8bc
2.37.2
d8d8bc