Live-Patching Archive on lore.kernel.org
 help / color / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>
Subject: [PATCH v2 3/4] selftests/livepatch: refine dmesg 'taints' in dmesg comparison
Date: Mon, 15 Jun 2020 13:27:55 -0400
Message-ID: <20200615172756.12912-4-joe.lawrence@redhat.com> (raw)
In-Reply-To: <20200615172756.12912-1-joe.lawrence@redhat.com>

The livepatch selftests currently grep on "taints" to 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.

Look for the longer "taints kernel" or "tainting kernel" strings to
avoid inadvertent partial matching.

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 bbbb4041f533..cb8a6df8c73a 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -273,7 +273,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 -v '\(tainting\|taints\) kernel')
 
 	if [[ "$expect" == "$result" ]] ; then
 		echo "ok"
-- 
2.21.3


  parent reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 17:27 [PATCH v2 0/4] selftests/livepatch: small script cleanups Joe Lawrence
2020-06-15 17:27 ` [PATCH v2 1/4] selftests/livepatch: Don't clear dmesg when running tests Joe Lawrence
2020-06-15 17:27 ` [PATCH v2 2/4] selftests/livepatch: use $(dmesg --notime) instead of manually filtering Joe Lawrence
2020-06-17  9:23   ` Petr Mladek
2020-06-17 11:22     ` Joe Lawrence
2020-06-15 17:27 ` Joe Lawrence [this message]
2020-06-15 17:27 ` [PATCH v2 4/4] selftests/livepatch: add test delimiter to dmesg Joe Lawrence
2020-06-16  8:29 ` [PATCH v2 0/4] selftests/livepatch: small script cleanups Kamalesh Babulal
2020-06-16 11:05 ` Miroslav Benes
2020-06-16 14:43 ` Petr Mladek
2020-06-16 15:16 ` Yannick Cote

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=20200615172756.12912-4-joe.lawrence@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.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

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