live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: Miroslav Benes <mbenes@suse.cz>,
	live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 3/3] selftests/livepatch: filter 'taints' from dmesg comparison
Date: Fri, 12 Jun 2020 13:47:06 +0200	[thread overview]
Message-ID: <20200612114706.GH4311@linux-b0ei> (raw)
In-Reply-To: <047eba61-b0b9-4e91-395f-13bafbf43af6@redhat.com>

On Thu 2020-06-11 09:10:38, Joe Lawrence wrote:
> On 6/11/20 3:39 AM, Miroslav Benes wrote:
> > On Wed, 10 Jun 2020, Joe Lawrence wrote:
> > 
> > > The livepatch selftests currently filter out "tainting kernel with
> > > TAINT_LIVEPATCH" messages which may be logged when loading livepatch
> > > modules.
> > > 
> > > Further filter the log to drop "loading out-of-tree module taints
> > > kernel" in the rare case the klp_test modules have been built
> > > out-of-tree.
> > > 
> > > Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
> > > ---
> > >   tools/testing/selftests/livepatch/functions.sh | 3 ++-
> > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> > > index 83560c3df2ee..f5d4ef12f1cb 100644
> > > --- a/tools/testing/selftests/livepatch/functions.sh
> > > +++ b/tools/testing/selftests/livepatch/functions.sh
> > > @@ -260,7 +260,8 @@ function check_result {
> > >   	local result
> > >   	result=$(dmesg --notime | diff --changed-group-format='%>' --unchanged-group-format='' "$SAVED_DMESG" - | \
> > > -		 grep -v 'tainting' | grep -e '^livepatch:' -e 'test_klp')
> > > +		 grep -e '^livepatch:' -e 'test_klp' | \
> > > +		 grep -ve '\<taints\>' -ve '\<tainting\>')
> > 
> > or make it just 'grep -v 'taint' ? It does not matter much though.
> > 
> 
> I don't know of any larger words* that may hit a partial match on "taint",
> but I figured the two word bounded regexes would be more specific.

I do not have strong opinion. I am fine with both current and Mirek's proposal.

I am just curious where \< and \> regexp substitutions are documented.
I see the following at the very end of "man re_syntax":

   \< and \> are synonyms for  “[[:<:]]” and “[[:>:]]” respectively

But I am not able to find documentation for “[[:<:]]” and “[[:>:]].
Even google looks helpless ;-)

Best Regards,
Petr

  reply	other threads:[~2020-06-12 11:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 17:20 [PATCH 0/3] selftests/livepatch: small script cleanups Joe Lawrence
2020-06-10 17:20 ` [PATCH 1/3] selftests/livepatch: Don't clear dmesg when running tests Joe Lawrence
2020-06-11  7:38   ` Miroslav Benes
2020-06-11 13:01     ` Joe Lawrence
2020-06-11 13:06       ` Miroslav Benes
2020-06-12  9:49   ` Petr Mladek
2020-06-14 15:19     ` Joe Lawrence
2020-06-12 10:11   ` Petr Mladek
2020-06-10 17:21 ` [PATCH 2/3] selftests/livepatch: use $(dmesg --notime) instead of manually filtering Joe Lawrence
2020-06-12 10:12   ` Petr Mladek
2020-06-10 17:21 ` [PATCH 3/3] selftests/livepatch: filter 'taints' from dmesg comparison Joe Lawrence
2020-06-11  7:39   ` Miroslav Benes
2020-06-11 13:10     ` Joe Lawrence
2020-06-12 11:47       ` Petr Mladek [this message]
2020-06-12 12:57         ` Kamalesh Babulal
2020-06-14 14:45           ` Joe Lawrence
2020-06-15  7:55             ` Miroslav Benes
2020-06-15  9:19               ` Petr Mladek

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=20200612114706.GH4311@linux-b0ei \
    --to=pmladek@suse.com \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    /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).