diff mbox series

[3/3] selftests/livepatch: filter 'taints' from dmesg comparison

Message ID 20200610172101.21910-4-joe.lawrence@redhat.com
State New
Headers show
Series [1/3] selftests/livepatch: Don't clear dmesg when running tests | expand

Commit Message

Joe Lawrence June 10, 2020, 5:21 p.m. UTC
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 mbox series

Patch

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\>')
 
 	if [[ "$expect" == "$result" ]] ; then
 		echo "ok"