btrfs-progs: tests: check for partscan support in misc/006-partitioned-loopdev
authorDavid Sterba <dsterba@suse.com>
Wed, 30 Nov 2016 15:49:18 +0000 (16:49 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 14 Dec 2016 14:06:35 +0000 (15:06 +0100)
The travis CI does not have losetup with --partscan, skip the check in
that case so we can still run the mkfs testsuite.

Signed-off-by: David Sterba <dsterba@suse.com>
tests/mkfs-tests/006-partitioned-loopdev/test.sh

index 4415b46..12f3784 100755 (executable)
@@ -3,6 +3,11 @@
 
 source $TOP/tests/common
 
+if ! losetup --help | grep -q 'partscan'; then
+       _not_run "losetup --partscan not available"
+       exit 0
+fi
+
 check_prereq mkfs.btrfs
 
 setup_root_helper