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