xfstests: remove unconditional setting of FSTYP
PATCH 1/1 xfstests: remove unconditional setting of FSTYP
Commit 3345d2150e9e672 ("xfstests: clean up and simply check CLI option parsing") hardcodes the FSTYP to xfs, testing other filesystems fails with
common.rc: Error: $TEST_DEV (/dev/sda5) is not a MOUNTED xfs filesystem
--- check | 1 - 1 file changed, 1 deletion(-)
check +0 -1
@@ -33,7 +33,6 @@ showme=false have_test_arg=false randomize=false here=`pwd` -FSTYP=xfs xfile="" # start the initialisation work now
Signature · 6 lines
1.8.2 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · David Sterba
Commit
3345d2150e9e672("xfstests: clean up and simply check CLI option parsing") hardcodes the FSTYP to xfs, testing other filesystems fails withcommon.rc: Error: $TEST_DEV (
/dev/sda5) is not a MOUNTED xfs filesystemSigned-off-by David Sterba <[email protected]>
That's not a complete fix, I haven't noticed the automatic fs detection via blkid, however it does not work because HOSTOS is not set:
./check:
53 # Autodetect fs type based on what's on $TEST_DEV 54 if [ "$HOSTOS" == "Linux" ]; then
55 FSTYP=blkid -c /dev/null -s TYPE -o value $TEST_DEV
56 fi
standalone "blkid -c /dev/null -s TYPE -o value $TEST_DEV`" works.
common/config:
60 HOSTOS=uname -s
although 'uname -s' gives me Linux.
It works together with an explicit
export FSTYP=whatever
david
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 11 lines · David Sterba
Quoted 7 lines · David Sterba
Commit
3345d2150e9e672("xfstests: clean up and simply check CLI option parsing") hardcodes the FSTYP to xfs, testing other filesystems fails withcommon.rc: Error: $TEST_DEV (
/dev/sda5) is not a MOUNTED xfs filesystemSigned-off-by David Sterba <[email protected]>That's not a complete fix, I haven't noticed the automatic fs detection via blkid, however it does not work because HOSTOS is not set:
Simply because HOSTOS is used before common/config is called. There was one more bug left, FSTYP is not exported so it is set correctly in 'check' but is not propagated to the subshells with tests.
david
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs