[PATCH 6/9] Detect FS type to test based on TEST_DEV

Eric Sandeen sandeen at sandeen.net
Wed May 27 13:53:30 CDT 2009


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 at sandeen.net>
---
 common |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/common b/common
index 92ec9e2..b5ca5d0 100644
--- 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
-- 
1.5.5.6




More information about the xfs mailing list