Live-Patching Archive on lore.kernel.org
 help / color / Atom feed
From: Miroslav Benes <mbenes@suse.cz>
To: Joe Lawrence <joe.lawrence@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
	shuah@kernel.org
Subject: Re: [PATCH] selftests/livepatch: filter 'taints' from dmesg comparison
Date: Thu, 7 Nov 2019 09:42:24 +0100 (CET)
Message-ID: <alpine.LSU.2.21.1911070939040.7917@pobox.suse.cz> (raw)
In-Reply-To: <20191106222801.7541-1-joe.lawrence@redhat.com>

On Wed, 6 Nov 2019, Joe Lawrence wrote:

> The livepatch selftests compare expected dmesg output to verify kernel
> behavior.  They currently filter out "tainting kernel with
> TAINT_LIVEPATCH" messages which may be logged when loading livepatch
> modules.
> 
> Further filter the log to also drop "loading out-of-tree module taints
> kernel" messages in case the klp_test modules have been build without
> the in-tree module flag.

That is true, but "tainting kernel with TAINT_LIVEPATCH" should be printed 
out even in this case. check_modinfo_livepatch() is called for all modules 
and relies on MODINFO(livepatch, Y).

So either the bug is elsewhere or I need one more cup of tea.

Miroslav
 
> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
> ---
> 
> Note: I stumbled across this in a testing scenario and thought it might
> be generally useful to extend this admittedly fragile mechanism.  Since
> there are no related livepatch-core changes, this can go through Shuah's
> kselftest tree if she prefers.  -- Joe
> 
>  tools/testing/selftests/livepatch/functions.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index 79b0affd21fb..57975c323542 100644
> --- a/tools/testing/selftests/livepatch/functions.sh
> +++ b/tools/testing/selftests/livepatch/functions.sh
> @@ -221,7 +221,7 @@ function check_result {
>  	local expect="$*"
>  	local result
>  
> -	result=$(dmesg | grep -v 'tainting' | grep -e 'livepatch:' -e 'test_klp' | sed 's/^\[[ 0-9.]*\] //')
> +	result=$(dmesg | grep -ve '\<taints\>' -ve '\<tainting\>' | grep -e 'livepatch:' -e 'test_klp' | sed 's/^\[[ 0-9.]*\] //')
>  
>  	if [[ "$expect" == "$result" ]] ; then
>  		echo "ok"
> -- 
> 2.21.0
> 


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 22:28 Joe Lawrence
2019-11-07  8:42 ` Miroslav Benes [this message]
2019-11-07 14:40   ` Joe Lawrence
2019-11-07 14:53     ` Miroslav Benes
2019-11-07 15:13       ` Joe Lawrence
2019-11-07 15:24         ` Miroslav Benes
2019-11-07 15:33           ` Joe Lawrence
2019-11-07 12:22 ` Kamalesh Babulal
2019-11-07 15:29 ` Petr Mladek

Reply instructions:

You may reply publically 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=alpine.LSU.2.21.1911070939040.7917@pobox.suse.cz \
    --to=mbenes@suse.cz \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=shuah@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

Live-Patching Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/live-patching/0 live-patching/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 live-patching live-patching/ https://lore.kernel.org/live-patching \
		live-patching@vger.kernel.org
	public-inbox-index live-patching

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.live-patching


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git