diff options
author | Miroslav Benes <mbenes@suse.cz> | 2020-08-27 14:07:09 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-08-27 16:27:24 +0300 |
commit | 884ee754f5aedbe54406a4d308a6cc57335747ce (patch) | |
tree | 7b48e43deba7aca2e5d2d42145fe6dc0794302c2 /tools/testing | |
parent | 1e21b5c73912a516bb13aec0ff69205b0b33568f (diff) | |
download | linux-884ee754f5aedbe54406a4d308a6cc57335747ce.tar.xz |
selftests/livepatch: Do not check order when using "comm" for dmesg checking
check_result() uses "comm" to check expected results of selftests output
in dmesg. Everything works fine if timestamps in dmesg are unique. If
not, like in this example
[ 86.844422] test_klp_callbacks_demo: pre_unpatch_callback: test_klp_callbacks_mod -> [MODULE_STATE_LIVE] Normal state
[ 86.844422] livepatch: 'test_klp_callbacks_demo': starting unpatching transition
, "comm" fails with "comm: file 2 is not in sorted order". Suppress the
order checking with --nocheck-order option.
Fixes: 2f3f651f3756 ("selftests/livepatch: Use "comm" instead of "diff" for dmesg")
Signed-off-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/livepatch/functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh index 1aba83c87ad3..846c7ed71556 100644 --- a/tools/testing/selftests/livepatch/functions.sh +++ b/tools/testing/selftests/livepatch/functions.sh @@ -278,7 +278,7 @@ function check_result { # help differentiate repeated testing runs. Remove them with a # post-comparison sed filter. - result=$(dmesg | comm -13 "$SAVED_DMESG" - | \ + result=$(dmesg | comm --nocheck-order -13 "$SAVED_DMESG" - | \ grep -e 'livepatch:' -e 'test_klp' | \ grep -v '\(tainting\|taints\) kernel' | \ sed 's/^\[[ 0-9.]*\] //') |