linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/lkdtm: Use "comm" instead of "diff" for dmesg
@ 2020-06-26 20:59 Kees Cook
  2020-06-27 11:51 ` Michael Ellerman
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kees Cook @ 2020-06-26 20:59 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Naresh Kamboju, Petr Mladek, Joe Lawrence, Michael Ellerman,
	linux-kselftest, linux-kernel

Instead of full GNU diff (which smaller boot environments may not have),
use "comm" which is more available.

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Link: https://lore.kernel.org/lkml/CA+G9fYtHP+Gg+BrR_GkBMxu2oOi-_e9pATtpb6TVRswv1G1r1Q@mail.gmail.com
Fixes: f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests")
Signed-off-by: Kees Cook <keescook@chromium.org>
---
 tools/testing/selftests/lkdtm/run.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh
index 8383eb89d88a..5fe23009ae13 100755
--- a/tools/testing/selftests/lkdtm/run.sh
+++ b/tools/testing/selftests/lkdtm/run.sh
@@ -82,7 +82,7 @@ dmesg > "$DMESG"
 ($SHELL -c 'cat <(echo '"$test"') >'"$TRIGGER" 2>/dev/null) || true
 
 # Record and dump the results
-dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$DMESG" - > "$LOG" || true
+dmesg | comm -13 "$DMESG" - > "$LOG" || true
 
 cat "$LOG"
 # Check for expected output
-- 
2.25.1


-- 
Kees Cook

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-09-09 21:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 20:59 [PATCH] selftests/lkdtm: Use "comm" instead of "diff" for dmesg Kees Cook
2020-06-27 11:51 ` Michael Ellerman
2020-06-27 15:52   ` Kees Cook
2020-06-29  5:50     ` Michael Ellerman
2020-06-30 18:53 ` Joe Lawrence
2020-09-09 19:49 ` Kees Cook
2020-09-09 20:29   ` Joe Lawrence
2020-09-09 21:12     ` Kees Cook
2020-09-09 20:49   ` Shuah Khan
2020-09-09 21:18     ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).