]> arthur.barton.de Git - bup.git/blobdiff - t/test-xdev.sh
index: always return at least the root for filter prefixes
[bup.git] / t / test-xdev.sh
index 747fd0b874e839f27201110570708c73d818949e..c71df93d5cd5f88dc5e0c5215f6eaada79641e76 100755 (executable)
@@ -4,14 +4,19 @@
 set -o pipefail
 
 if [ $(t/root-status) != root ]; then
-    echo 'Not root: skipping xdev tests.'
+    WVSTART 'not root: skipping tests'
     exit 0 # FIXME: add WVSKIP.
 fi
 
+if ! modprobe loop; then
+    WVSTART 'unable to load loopback module; skipping tests' 1>&2
+    exit 0
+fi
+
 # These tests are only likely to work under Linux for now
 # (patches welcome).
 if ! [[ $(uname) =~ Linux ]]; then
-    echo 'Not Linux: skipping xdev tests.'
+    WVSTART 'not Linux: skipping tests'
     exit 0 # FIXME: add WVSKIP.
 fi
 
@@ -62,7 +67,8 @@ WVPASS bup save -n src src
 WVPASS mkdir src-restore
 WVPASS bup restore -C src-restore "/src/latest$(pwd)/"
 WVPASS test -d src-restore/src
-WVPASSEQ "$(cd src-restore/src && find . -not -name lost+found | sort)" ".
+WVPASSEQ "$(cd src-restore/src && find . -not -name lost+found | LC_ALL=C sort)" \
+".
 ./1
 ./mnt"