]> Git Repo - linux.git/commitdiff
selftests/livepatch: refine dmesg 'taints' in dmesg comparison
authorJoe Lawrence <[email protected]>
Thu, 18 Jun 2020 18:10:39 +0000 (14:10 -0400)
committerPetr Mladek <[email protected]>
Fri, 19 Jun 2020 08:47:04 +0000 (10:47 +0200)
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 <[email protected]>
Reviewed-by: Kamalesh Babulal <[email protected]>
Reviewed-by: Yannick Cote <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
tools/testing/selftests/livepatch/functions.sh

index bf73ec4f4a713f3f06e0464ba8c6a47ae9d1d33f..5e5a79179fc1d7c56a06e3c89cff1547adc0b9a6 100644 (file)
@@ -277,7 +277,8 @@ function check_result {
        # post-comparison sed filter.
 
        result=$(dmesg | 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' | \
                 sed 's/^\[[ 0-9.]*\] //')
 
        if [[ "$expect" == "$result" ]] ; then
This page took 0.065405 seconds and 4 git commands to generate.