xfstests: check: set up config variables before using them
authorDavid Sterba <dsterba@suse.cz>
Thu, 28 Mar 2013 17:00:18 +0000 (17:00 +0000)
committerRich Johnston <rjohnston@sgi.com>
Thu, 28 Mar 2013 21:04:09 +0000 (16:04 -0500)
HOSTOS was used in a test before being initialized and this led to
failed filesystem type detection.

Signed-off-by: David Sterba <dsterba@suse.cz>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by-by: Rich Johnston <rjohnston@sgi.com>
check

diff --git a/check b/check
index 18cae754c3b5f4e315624efcfef47d7512506883..3b484028d4c3256a964765dd8634ded350f3f237 100755 (executable)
--- a/check
+++ b/check
@@ -50,12 +50,6 @@ timestamp=${TIMESTAMP:=false}
 
 rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.xlist
 
-# Autodetect fs type based on what's on $TEST_DEV
-if [ "$HOSTOS" == "Linux" ]; then
-    FSTYP=`blkid -c /dev/null -s TYPE -o value $TEST_DEV`
-fi
-export FSTYP
-
 # we need common.config
 if ! . ./common/config
 then
@@ -63,6 +57,12 @@ then
     exit 1
 fi
 
+# Autodetect fs type based on what's on $TEST_DEV
+if [ "$HOSTOS" == "Linux" ]; then
+    FSTYP=`blkid -c /dev/null -s TYPE -o value $TEST_DEV`
+fi
+export FSTYP
+
 SUPPORTED_TESTS="[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]"
 SRC_GROUPS="generic shared"
 export SRC_DIR="tests"