Thread (4 messages) flat view 4 messages, 4 authors, 2020-07-14
STALE2265d LANDED

Landed in mainline as 2f3f651f3756 on 2020-07-14.

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

From: Joe Lawrence <joe.lawrence@redhat.com>
Date: 2020-07-10 18:38:50
Also in: linux-kselftest
Subsystem: kernel selftest framework, live patching, the rest · Maintainers: Shuah Khan, Shuah Khan, Josh Poimboeuf, Jiri Kosina, Miroslav Benes, Petr Mladek, Linus Torvalds

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 <redacted>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
---

based-on: livepatching.git/for-5.9/selftests-cleanup
merge-thru: livepatching.git

 tools/testing/selftests/livepatch/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index 36648ca367c2..408529d94ddb 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -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.]*\] //')
-- 
2.21.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help