fix _require_scratch test for extN, resierfs, gfs2, and btrfs
[xfstests-dev.git] / common.rc
index 581cfbae32656487fc82366d621d8b3964c6509a..39350b31c0fdfb36479ba2895fa4bb2a3a66b469 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -593,26 +593,23 @@ _supported_os()
 _require_scratch()
 {
     case "$FSTYP" in
-       xfs|udf)
-                if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
+       nfs*)
+                echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
+                if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]
                 then
                     _notrun "this test requires a valid \$SCRATCH_DEV"
                 fi
-                if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev $TEST_DEV`" ]
+                ;;
+       *)
+                if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
                 then
                     _notrun "this test requires a valid \$SCRATCH_DEV"
                 fi
-                ;;
-       nfs*|ext2|ext3|ext4|reiserfs|gfs2|btrfs)
-                echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
-                if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
+                if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev $TEST_DEV`" ]
                 then
                     _notrun "this test requires a valid \$SCRATCH_DEV"
                 fi
                 ;;
-       *)
-                _notrun "\$FSTYP ($FSTYP) unknown or not specified"
-                ;;
     esac
 
     # mounted?