Skip to content

Commit 7d41dad

Browse files
eddyz87Alexei Starovoitov
authored andcommitted
selftests/bpf: less spam in the log for message matching
When running test_loader based tests in the verbose mode each matched message leaves a trace in the stderr, e.g.: ./test_progs -vvv -t ... validate_msgs:PASS:expect_msg 0 nsec validate_msgs:PASS:expect_msg 0 nsec validate_msgs:PASS:expect_msg 0 nsec validate_msgs:PASS:expect_msg 0 nsec validate_msgs:PASS:expect_msg 0 nsec This is not very helpful when debugging such tests and clobbers the log a lot. Signed-off-by: Eduard Zingerman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent ffc41ce commit 7d41dad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/bpf/test_loader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ static void validate_msgs(char *log_buf, struct expected_msgs *msgs,
531531
}
532532
}
533533

534-
if (!ASSERT_OK_PTR(match, "expect_msg")) {
534+
if (!match) {
535+
PRINT_FAIL("expect_msg\n");
535536
if (env.verbosity == VERBOSE_NONE)
536537
emit_fn(log_buf, true /*force*/);
537538
for (j = 0; j <= i; j++) {

0 commit comments

Comments
 (0)