selftests/bpf: Ensure consistent test failure output
authorAndrii Nakryiko <andriin@fb.com>
Fri, 13 Mar 2020 17:23:33 +0000 (10:23 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Mar 2020 22:30:53 +0000 (23:30 +0100)
commit3e2671fb9a95d2b46990832466383ec8384d88a3
treeb71e83c60faef2de1a4704f4e10bad681227c461
parent30b4cb36b11144e29b4f837057f8ab31aac10b8a
selftests/bpf: Ensure consistent test failure output

printf() doesn't seem to honor using overwritten stdout/stderr (as part of
stdio hijacking), so ensure all "standard" invocations of printf() do
fprintf(stdout, ...) instead.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200313172336.1879637-2-andriin@fb.com
tools/testing/selftests/bpf/test_progs.c
tools/testing/selftests/bpf/test_progs.h