From: ranto.boris@gmail.com
To: xfs@oss.sgi.com
Cc: Boris Ranto <ranto.boris@gmail.com>
Subject: [PATCH 2/3] xfstests: Do not fail on non-existing tests/FSTYP directory
Date: Thu, 2 May 2013 16:03:58 +0200 [thread overview]
Message-ID: <1367503439-12827-3-git-send-email-ranto.boris@gmail.com> (raw)
In-Reply-To: <1367503439-12827-1-git-send-email-ranto.boris@gmail.com>
From: Boris Ranto <ranto.boris@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@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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-05-02 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 14:03 [PATCH 0/3] Tmpfs support and fixes for tmpfs/nfs ranto.boris
2013-05-02 14:03 ` [PATCH 1/3] xfstests: Add tmpfs support ranto.boris
2013-05-02 14:03 ` ranto.boris [this message]
2013-05-02 14:03 ` [PATCH 3/3] xfstests: Do not fail on empty exclude groups ranto.boris
2013-05-13 12:57 ` [PATCH 0/3] Tmpfs support and fixes for tmpfs/nfs Boris Ranto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367503439-12827-3-git-send-email-ranto.boris@gmail.com \
--to=ranto.boris@gmail.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox