From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH kvm-unit-tests] scripts: Fix the check whether testname is in the only_tests list
Date: Wed, 1 Jul 2020 12:05:39 +0200 [thread overview]
Message-ID: <a972d2db-4c41-3140-2716-f797ed27f440@redhat.com> (raw)
In-Reply-To: <db772d67-a16a-086b-bfc3-e9348ea27c16@redhat.com>
On 01/07/20 11:52, Thomas Huth wrote:
>> +function find_word()
>> +{
>> + grep -q " $1 " <<< " $2 "
>> +}
>
> Ah, clever idea with the surrounding spaces here!
That's what you gain from learning to program in GW-BASIC, who wants
regular expression when you have INSTR.
But seriously: what do you think about adding "-F"? The use of regex in
only_tests/only_group is not documented and might have surprising
effects. If we want to keep it, we could replace spaces with newlines
and use ^$ in the regex.
Paolo
> Works great for me, so:
> Tested-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
next prev parent reply other threads:[~2020-07-01 10:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 9:46 [PATCH kvm-unit-tests] scripts: Fix the check whether testname is in the only_tests list Paolo Bonzini
2020-07-01 9:52 ` Thomas Huth
2020-07-01 10:05 ` Paolo Bonzini [this message]
2020-07-01 10:11 ` Thomas Huth
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=a972d2db-4c41-3140-2716-f797ed27f440@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=thuth@redhat.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).