From fe526cfdc755fb0b10fcdbe03ed0a81d9e66d89d Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 11 Aug 2018 12:24:07 -0500 Subject: [PATCH] test-index-check-device: use separate files for loopback mounts 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 Tested-by: Rob Browning --- t/test-index-check-device.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/test-index-check-device.sh b/t/test-index-check-device.sh index 4138234..88a966a 100755 --- a/t/test-index-check-device.sh +++ b/t/test-index-check-device.sh @@ -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" -- 2.39.2