Skip to content

Commit

Permalink
selftests/bpf: Move summary line after the error logs
Browse files Browse the repository at this point in the history
Makes it easier to find the summary line when there is a lot of logs to
scroll back.

Signed-off-by: Yucong Sun <sunyucong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211112192535.898352-2-fallentree@fb.com
  • Loading branch information
Yucong Sun authored and Andrii Nakryiko committed Nov 17, 2021
1 parent d41bc48 commit ea78548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/testing/selftests/bpf/test_progs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,11 +1198,11 @@ static int server_main(void)
env.sub_succ_cnt += result->sub_succ_cnt;
}

print_all_error_logs();

fprintf(stdout, "Summary: %d/%d PASSED, %d SKIPPED, %d FAILED\n",
env.succ_cnt, env.sub_succ_cnt, env.skip_cnt, env.fail_cnt);

print_all_error_logs();

/* reap all workers */
for (i = 0; i < env.workers; i++) {
int wstatus, pid;
Expand Down Expand Up @@ -1484,11 +1484,11 @@ int main(int argc, char **argv)
if (env.list_test_names)
goto out;

print_all_error_logs();

fprintf(stdout, "Summary: %d/%d PASSED, %d SKIPPED, %d FAILED\n",
env.succ_cnt, env.sub_succ_cnt, env.skip_cnt, env.fail_cnt);

print_all_error_logs();

close(env.saved_netns_fd);
out:
if (!env.list_test_names && env.has_testmod)
Expand Down

0 comments on commit ea78548

Please sign in to comment.