]> arthur.barton.de Git - bup.git/blobdiff - t/test-index-check-device.sh
get: adjust for python 3 and test there
[bup.git] / t / test-index-check-device.sh
index 9c50534a8d92157ad34f1f94e5a2f45340515ff3..88a966a330dff54b2ddf148e40b91482c1536c59 100755 (executable)
@@ -4,7 +4,9 @@
 
 set -o pipefail
 
-if [ $(t/root-status) != root ]; then
+root_status="$(t/root-status)" || exit $?
+
+if [ "$root_status" != root ]; then
     echo 'Not root: skipping --check-device tests.'
     exit 0 # FIXME: add WVSKIP.
 fi
@@ -51,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"