]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: Fix test wildcard expansion.
authorRich Johnston <rjohnston@sgi.com>
Fri, 31 May 2013 12:02:48 +0000 (07:02 -0500)
committerRich Johnston <rjohnston@sgi.com>
Fri, 31 May 2013 12:02:48 +0000 (07:02 -0500)
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

Change to use egrep to fix the parsing.

Signed-off-by: Rich Johnston <rjohnston@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
check

diff --git a/check b/check
index 8d324860f5e9c5e4ac1cf2ef2dcfd4dc39cb39d5..ff8fbcf4615561e7cc42e15e43eed8a70d598272 100755 (executable)
--- a/check
+++ b/check
@@ -242,7 +242,7 @@ 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
+                       if egrep "^$test_name" $group_file >/dev/null ; then
                                # in group file ... OK
                                echo $SRC_DIR/$1 >>$tmp.list
                        else