]> Git Repo - linux.git/commitdiff
selftests/livepatch: Use "comm" instead of "diff" for dmesg
authorJoe Lawrence <[email protected]>
Fri, 10 Jul 2020 18:37:45 +0000 (14:37 -0400)
committerPetr Mladek <[email protected]>
Tue, 14 Jul 2020 07:32:27 +0000 (09:32 +0200)
BusyBox diff doesn't support the GNU diff '--LTYPE-line-format' options
that were used in the selftests to filter older kernel log messages from
dmesg output.

Use "comm" which is more available in smaller boot environments.

Reported-by: Naresh Kamboju <[email protected]>
Signed-off-by: Joe Lawrence <[email protected]>
Reviewed-by: Yannick Cote <[email protected]>
Reviewed-by: Kamalesh Babulal <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
tools/testing/selftests/livepatch/functions.sh

index 36648ca367c23841d84acce8146f4f33903ccad6..408529d94ddba806a625baac1fb4c372b9c37c1a 100644 (file)
@@ -277,7 +277,7 @@ function check_result {
        # help differentiate repeated testing runs.  Remove them with a
        # post-comparison sed filter.
 
-       result=$(dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$SAVED_DMESG" - | \
+       result=$(dmesg | comm -13 "$SAVED_DMESG" - | \
                 grep -e 'livepatch:' -e 'test_klp' | \
                 grep -v '\(tainting\|taints\) kernel' | \
                 sed 's/^\[[ 0-9.]*\] //')
This page took 0.054311 seconds and 4 git commands to generate.