]> arthur.barton.de Git - bup.git/commitdiff
test-index-check-device: use separate files for loopback mounts
authorRob Browning <rlb@defaultvalue.org>
Sat, 11 Aug 2018 17:24:07 +0000 (12:24 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 11 Aug 2018 19:45:33 +0000 (14:45 -0500)
Previously we were mounting the same image twice, which may produce
the same device number.

Thanks to Mateusz Pavlic for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test-index-check-device.sh

index 41382344a967bf284cf8504cb70781f969d3b2eb..88a966a330dff54b2ddf148e40b91482c1536c59 100755 (executable)
@@ -53,8 +53,9 @@ WVPASS date > "$tmpmnt1/foo"
 WVPASS umount "$tmpmnt1"
 
 # Mount twice, so we'll have the same content with different devices.
+WVPASS cp -pP testfs.img testfs2.img
 WVPASS mount -oro,loop testfs.img "$tmpmnt1"
-WVPASS mount -oro,loop testfs.img "$tmpmnt2"
+WVPASS mount -oro,loop testfs2.img "$tmpmnt2"
 
 # Test default behavior: --check-device.
 WVPASS mount -oro --bind "$tmpmnt1" "$srcmnt"