From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Dave Chinner <david@fromorbit.com>, fstests@vger.kernel.org
Subject: Re: [PATCH] common: fix excluding test groups
Date: Fri, 9 Dec 2016 12:16:41 +0800 [thread overview]
Message-ID: <20161209041641.GL29149@eguan.usersys.redhat.com> (raw)
In-Reply-To: <1481204070-10881-1-git-send-email-amir73il@gmail.com>
On Thu, Dec 08, 2016 at 03:34:30PM +0200, Amir Goldstein wrote:
> The -x flag is used to exclude tests that belong to
> certain groups from the test args list.
>
> When the test args list is expressed as a match pattern,
> -x fails to exclude the tests that match the pattern
> and belong to excluded groups.
>
> For example:
> $ ./check -n -x xfs/??? | wc -l
You mean "./check -n -x fuzzers,dangerous_fuzzers | wc -l" here?
> 341
> $ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l
> 341
>
> After the fix:
> $ ./check -n -x fuzzers,dangerous_fuzzers xfs/??? | wc -l
> 315
>
> This bug seems to date back to this git repo epoc.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> check | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/check b/check
> index 8f2a1bb..9732460 100755
> --- a/check
> +++ b/check
> @@ -158,11 +158,14 @@ _timestamp()
> _prepare_test_list()
> {
> unset list
> + touch $tmp.list
> # Tests specified on the command line
> if [ -s $tmp.arglist ]; then
> - cat $tmp.arglist > $tmp.list
> - else
> - touch $tmp.list
> + # flatten multi tests line (tests/$fs/???) to 1 test per line
> + list=$(cat $tmp.arglist)
> + for t in $list; do
> + echo "$t" >> $tmp.list
> + done
Perhaps a sed is more efficient? e.g.
- cat $tmp.arglist > $tmp.list
+ sed 's/ \+/\n/g' $tmp.arglist > $tmp.list
Thanks,
Eryu
next prev parent reply other threads:[~2016-12-09 4:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 13:34 [PATCH] common: fix excluding test groups Amir Goldstein
2016-12-09 4:16 ` Eryu Guan [this message]
2016-12-09 4:57 ` Amir Goldstein
2016-12-09 5:35 ` Amir Goldstein
2016-12-09 5:52 ` Eryu Guan
2016-12-09 5:40 ` Dave Chinner
2016-12-09 7:51 ` Amir Goldstein
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=20161209041641.GL29149@eguan.usersys.redhat.com \
--to=eguan@redhat.com \
--cc=amir73il@gmail.com \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
/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