From: Theodore Ts'o <tytso@mit.edu>
To: xfs@oss.sgi.com
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH] check: add support for an external test expunging file
Date: Mon, 14 Apr 2014 22:52:00 -0400 [thread overview]
Message-ID: <1397530320-20579-1-git-send-email-tytso@mit.edu> (raw)
Currently the -X option is intended to specify a set of expunging
files which are stored in each test/* subdirectory. As described in
the commit description for 0b1e8abd4, in order to exclude the test
generic/280, the -X option is used as follows:
$ cat tests/generic/3.0-stable-avoid
280
$ sudo ./check -X 3.0-stable-avoid generic/280
However, it is sometimes useful to store the set of expunged tests in
a single file, outside of tests/* subdirectories. This commit allows
the following:
$ cat /root/conf/data_journal.exclude
generic/068
ext4/301
$ sudo ./check -X /root/conf/data_journal.exclude -g auto
If the argument to the -X option is a pathname (that is, includes a
'/' character), treat it as the latter case. If it the argument to
the -X option is just a bare filename (that is, does not include '/'
character), treat it as the former.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
check | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/check b/check
index e7ace63..791a386 100755
--- a/check
+++ b/check
@@ -215,12 +215,22 @@ while [ $# -gt 0 ]; do
;;
-X) xfile=$2; shift ;
- for d in $SRC_GROUPS $FSTYP; do
- [ -f $SRC_DIR/$d/$xfile ] || continue
- for f in `cat $SRC_DIR/$d/$xfile`; do
- echo $d/$f >> $tmp.xlist
+ case "$xfile" in
+ */*) if [ -f "$xfile" ]; then
+ cat "$xfile" >> $tmp.xlist
+ else
+ echo "Exclusion file $xfile not found"
+ exit 1
+ fi
+ ;;
+ *) for d in $SRC_GROUPS $FSTYP; do
+ [ -f $SRC_DIR/$d/$xfile ] || continue
+ for f in `cat $SRC_DIR/$d/$xfile`; do
+ echo $d/$f >> $tmp.xlist
+ done
done
- done
+ ;;
+ esac
;;
-s) RUN_SECTION="$RUN_SECTION $2"; shift ;;
-l) diff="diff" ;;
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2014-04-15 2:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 2:52 Theodore Ts'o [this message]
2014-04-16 0:15 ` [PATCH] check: add support for an external test expunging file Dave Chinner
2014-04-16 0:25 ` Theodore Ts'o
2014-04-16 0:34 ` Dave Chinner
2014-04-16 4:58 ` [PATCH -v2] check: add support for an external file containing tests to exclude Theodore Ts'o
2014-04-16 6:40 ` Dave Chinner
2014-05-12 12:42 ` Theodore Ts'o
2014-05-12 22:00 ` Dave Chinner
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=1397530320-20579-1-git-send-email-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).