From: Eric Sandeen Date: Wed, 27 May 2009 18:44:57 +0000 (-0500) Subject: Detect FS type to test based on TEST_DEV X-Git-Tag: v1.1.0~292 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=39964bfaa2f3066ab269c92815e9f3f9c14432be;p=xfstests-dev.git Detect FS type to test based on TEST_DEV 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 --- diff --git a/common b/common index 92ec9e2c..b5ca5d07 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