* [PATCH] xfstests: Fix test wildcard expansion.
@ 2013-05-30 22:02 Rich Johnston
2013-05-30 22:12 ` Dave Chinner
2013-05-30 22:32 ` [PATCH V2] " Rich Johnston
0 siblings, 2 replies; 5+ messages in thread
From: Rich Johnston @ 2013-05-30 22:02 UTC (permalink / raw)
To: xfstests
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@sgi.com>
---
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfstests: Fix test wildcard expansion.
2013-05-30 22:02 [PATCH] xfstests: Fix test wildcard expansion Rich Johnston
@ 2013-05-30 22:12 ` Dave Chinner
2013-05-30 22:32 ` [PATCH V2] " Rich Johnston
1 sibling, 0 replies; 5+ messages in thread
From: Dave Chinner @ 2013-05-30 22:12 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfstests
On Thu, May 30, 2013 at 05:02:19PM -0500, Rich Johnston wrote:
>
> 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.
I just fixed this locally myself:
- if grep "^$test_name" $group_file >/dev/null ; then
+ if egrep "^$test_name" $group_file >/dev/null ; then
Which just tells grep to treat the pattern as an extended regex....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V2] xfstests: Fix test wildcard expansion.
2013-05-30 22:02 [PATCH] xfstests: Fix test wildcard expansion Rich Johnston
2013-05-30 22:12 ` Dave Chinner
@ 2013-05-30 22:32 ` Rich Johnston
2013-05-30 22:38 ` Dave Chinner
1 sibling, 1 reply; 5+ messages in thread
From: Rich Johnston @ 2013-05-30 22:32 UTC (permalink / raw)
To: xfstests
Before commit 38d58591 "xfstests: fix typo in check",
check xfs/[0-9]?? would execute all tests/xfs/[0-9]?? because:
Change to use egrep to fix the parsing.
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
---
V1-V2
Use egrep instead of my bulky method
diff --git a/check b/check
index 8d32486..ff8fbcf 100755
--- 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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2] xfstests: Fix test wildcard expansion.
2013-05-30 22:32 ` [PATCH V2] " Rich Johnston
@ 2013-05-30 22:38 ` Dave Chinner
2013-05-31 12:10 ` Rich Johnston
0 siblings, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2013-05-30 22:38 UTC (permalink / raw)
To: Rich Johnston; +Cc: xfstests
On Thu, May 30, 2013 at 05:32:48PM -0500, Rich Johnston wrote:
>
> Before commit 38d58591 "xfstests: fix typo in check",
> check xfs/[0-9]?? would execute all tests/xfs/[0-9]?? because:
>
> Change to use egrep to fix the parsing.
>
> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
> ---
> V1-V2
> Use egrep instead of my bulky method
looks like you lost a bit of the commit message. Otherwise it works
fine here ;)
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V2] xfstests: Fix test wildcard expansion.
2013-05-30 22:38 ` Dave Chinner
@ 2013-05-31 12:10 ` Rich Johnston
0 siblings, 0 replies; 5+ messages in thread
From: Rich Johnston @ 2013-05-31 12:10 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfstests
On 05/30/2013 05:38 PM, Dave Chinner wrote:
> On Thu, May 30, 2013 at 05:32:48PM -0500, Rich Johnston wrote:
>>
>> Before commit 38d58591 "xfstests: fix typo in check",
>> check xfs/[0-9]?? would execute all tests/xfs/[0-9]?? because:
>>
>> Change to use egrep to fix the parsing.
>>
>> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
>> ---
>> V1-V2
>> Use egrep instead of my bulky method
>
> looks like you lost a bit of the commit message. Otherwise it works
> fine here ;)
Oops dang cut/paste, I put it back.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
Thanks for the review Dave.
commit 9267afb16b8e861888e54f829015667753034980
Author: Rich Johnston <rjohnston@sgi.com>
Date: Fri May 31 07:02:48 2013 -0500
xfstests: Fix test wildcard expansion.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-31 12:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 22:02 [PATCH] xfstests: Fix test wildcard expansion Rich Johnston
2013-05-30 22:12 ` Dave Chinner
2013-05-30 22:32 ` [PATCH V2] " Rich Johnston
2013-05-30 22:38 ` Dave Chinner
2013-05-31 12:10 ` Rich Johnston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox