Skip to content

Commit

Permalink
selftests/bpf: Add missing line break in test_verifier
Browse files Browse the repository at this point in the history
There are no break lines in the test log for test_verifier #106 ~ #111
if jit is disabled, add the missing line break at the end of printf()
to fix it.

Without this patch:

  [root@linux bpf]# echo 0 > /proc/sys/net/core/bpf_jit_enable
  [root@linux bpf]# ./test_verifier 106
  #106/p inline simple bpf_loop call SKIP (requires BPF JIT)Summary: 0 PASSED, 1 SKIPPED, 0 FAILED

With this patch:

  [root@linux bpf]# echo 0 > /proc/sys/net/core/bpf_jit_enable
  [root@linux bpf]# ./test_verifier 106
  #106/p inline simple bpf_loop call SKIP (requires BPF JIT)
  Summary: 0 PASSED, 1 SKIPPED, 0 FAILED

Fixes: 0b50478 ("selftests/bpf: Skip callback tests if jit is disabled in test_verifier")
Signed-off-by: Tiezhu Yang <[email protected]>
  • Loading branch information
Tiezhu Yang authored and Kernel Patches Daemon committed Jan 26, 2024
1 parent 638a4a2 commit b27d589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_verifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ static void do_test_single(struct bpf_test *test, bool unpriv,
int i, err;

if ((test->flags & F_NEEDS_JIT_ENABLED) && jit_disabled) {
printf("SKIP (requires BPF JIT)");
printf("SKIP (requires BPF JIT)\n");
skips++;
sched_yield();
return;
Expand Down

0 comments on commit b27d589

Please sign in to comment.