]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
Detect FS type to test based on TEST_DEV
authorEric Sandeen <sandeen@sandeen.net>
Wed, 27 May 2009 18:44:57 +0000 (13:44 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 27 May 2009 18:44:57 +0000 (13:44 -0500)
This helps support generic / non-xfs fileystems.

Rather than defaulting to xfs or expecting a fs
type passed in, just look at what is on TEST_DEV
and use that for FSTYP by default.

We may wish to add a generic way to override this later.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
common

diff --git a/common b/common
index 92ec9e2cab334a83bf1515a07b2f21b6805484bc..b5ca5d070761780c3a93b0a5509412e142ce4b04 100644 (file)
--- a/common
+++ b/common
@@ -30,7 +30,13 @@ have_test_arg=false
 randomize=false
 rm -f $tmp.list $tmp.tmp $tmp.sed
 
-export FSTYP=xfs
+# Autodetect fs type based on what's on $TEST_DEV
+if [ "$HOSTOS" == "Linux" ]
+then
+    export FSTYP=`blkid -s TYPE -o value $TEST_DEV`
+else
+    export FSTYP=xfs
+fi
 
 for r
 do