Message ID | 20200615172756.12912-4-joe.lawrence@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | selftests/livepatch: small script cleanups | expand |
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"
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(-)