Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/livepatch: Use "comm" instead of "diff" for dmesg

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 <naresh.kamboju@linaro.org>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Yannick Cote <ycote@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20200710183745.19730-1-joe.lawrence@redhat.com

authored by

Joe Lawrence and committed by
Petr Mladek
2f3f651f 3fd9bd8b

+1 -1
+1 -1
tools/testing/selftests/livepatch/functions.sh
··· 277 277 # help differentiate repeated testing runs. Remove them with a 278 278 # post-comparison sed filter. 279 279 280 - result=$(dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$SAVED_DMESG" - | \ 280 + result=$(dmesg | comm -13 "$SAVED_DMESG" - | \ 281 281 grep -e 'livepatch:' -e 'test_klp' | \ 282 282 grep -v '\(tainting\|taints\) kernel' | \ 283 283 sed 's/^\[[ 0-9.]*\] //')