| To: | xfstests <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfstests: Fix test wildcard expansion. |
| From: | Rich Johnston <rjohnston@xxxxxxx> |
| Date: | Thu, 30 May 2013 17:02:19 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
Before commit 38d58591 "xfstests: fix typo in check",
check xfs/[0-9]?? would execute all tests/xfs/[0-9]?? because:
'if grep "^$testname" $group_file >/dev/null'
returns the contents of $group_file because $testname="".
Therefore xfs/[0-9]?? was echoed to $tmp.list
Fix the parsing in check to expand the regular expressions for test names.
Signed-off-by: Rich Johnston <rjohnston@xxxxxxx>
---
diff --git a/check b/check
index 8d32486..eb5d9be 100755
--- a/check
+++ b/check
@@ -242,13 +242,15 @@ if $have_test_arg; then
test_name=`basename $1`
group_file=$SRC_DIR/$test_dir/group
- if grep "^$test_name" $group_file >/dev/null ; then
- # in group file ... OK
- echo $SRC_DIR/$1 >>$tmp.list
- else
- # oops
- echo "$1 - unknown test, ignored"
- fi
+ for f in `cd $SRC_DIR/$test_dir; ls $test_name`; do
+ if grep "^$f" $group_file >/dev/null ; then
+ # in group file ... OK
+ echo $SRC_DIR/$test_dir/$f >>$tmp.list
+ else
+ # oops
+ echo "$test_dir/$f - unknown test,
ignored"
+ fi
+ done
;;
esac
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2/3 v2] 285: Fix indentation of do_pwrite, Eric Sandeen |
|---|---|
| Next by Date: | Re: [PATCH] xfstests: Fix test wildcard expansion., Dave Chinner |
| Previous by Thread: | [PATCH 1/3 v2] 285: Fix test for ext4 in some configurations, Jan Kara |
| Next by Thread: | Re: [PATCH] xfstests: Fix test wildcard expansion., Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |