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