Skip to content

Commit 884ee75

Browse files
mirabJiri Kosina
authored andcommitted
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: 2f3f651 ("selftests/livepatch: Use "comm" instead of "diff" for dmesg") Signed-off-by: Miroslav Benes <[email protected]> Acked-by: Joe Lawrence <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1e21b5c commit 884ee75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/livepatch/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function check_result {
278278
# help differentiate repeated testing runs. Remove them with a
279279
# post-comparison sed filter.
280280

281-
result=$(dmesg | comm -13 "$SAVED_DMESG" - | \
281+
result=$(dmesg | comm --nocheck-order -13 "$SAVED_DMESG" - | \
282282
grep -e 'livepatch:' -e 'test_klp' | \
283283
grep -v '\(tainting\|taints\) kernel' | \
284284
sed 's/^\[[ 0-9.]*\] //')

0 commit comments

Comments
 (0)