[PATCH 2/3] xfstests: Do not fail on non-existing tests/FSTYP directory
ranto.boris at gmail.com
ranto.boris at gmail.com
Thu May 2 09:03:58 CDT 2013
From: Boris Ranto <ranto.boris at gmail.com>
Currently, if a user runs ./check -n to get the list of tests to run on
a file system such as nfs or tmpfs, then the ./check script will fail
since there are no tests/nfs and tests/tmpfs subdirectories (and hence,
no group files and no specific tests for the directories). This patch
will conditionally add FSTYP to SRC_GROUPS and remove all further
additions of FSTYP to the variable.
Signed-off-by: Boris Ranto <ranto.boris at gmail.com>
---
check | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/check b/check
index fc335ec..4af2dbd 100755
--- a/check
+++ b/check
@@ -64,7 +64,12 @@ fi
export FSTYP
SUPPORTED_TESTS="[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]"
-SRC_GROUPS="generic shared"
+# Include FSTYP to SRC_GROUPS if a directory for it exists
+if [ -d $SRC_DIR/$d ]; then
+ SRC_GROUPS="generic shared $FSTYP"
+else
+ SRC_GROUPS="generic shared"
+fi
export SRC_DIR="tests"
export RESULT_BASE=${RESULT_BASE:="$here/results"}
@@ -97,7 +102,7 @@ get_group_list()
{
grp=$1
- for d in $SRC_GROUPS $FSTYP; do
+ for d in $SRC_GROUPS; do
l=$(sed -n < $SRC_DIR/$d/group \
-e 's/#.*//' \
-e 's/$/ /' \
@@ -113,7 +118,7 @@ get_group_list()
get_all_tests()
{
touch $tmp.list
- for d in $SRC_GROUPS $FSTYP; do
+ for d in $SRC_GROUPS; do
ls $SRC_DIR/$d/* | \
grep -v "\..*" | \
grep -v group >> $tmp.list 2>/dev/null
@@ -198,7 +203,7 @@ while [ $# -gt 0 ]; do
;;
-X) xfile=$2; shift ;
- for d in $SRC_GROUPS $FSTYP; do
+ for d in $SRC_GROUPS; do
[ -f $SRC_DIR/$d/$xfile ] || continue
for f in `cat $SRC_DIR/$d/$xfile`; do
echo $d/$f >> $tmp.xlist
--
1.7.1
More information about the xfs
mailing list