diff options
author | Alexei Starovoitov <ast@kernel.org> | 2019-08-06 20:17:52 -0400 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-08-06 20:17:53 -0400 |
commit | 682cdbdc216028f5340e48e92e59e3e9503957bb (patch) | |
tree | 1822c880732872e2ffb4a9496a4bfaf221da58ce /tools/testing/selftests/bpf/prog_tests/xdp_noinline.c | |
parent | 8c30396074c131765b19eb3cb7ff764a4f2f2913 (diff) | |
parent | 16e910d4467ccdf1cae5035e71035e5f7197e77d (diff) |
Merge branch 'test_progs-stdio'
Stanislav Fomichev says:
====================
I was looking into converting test_sockops* to test_progs framework
and that requires using cgroup_helpers.c which rely on stdio/stderr.
Let's use open_memstream to override stdout into buffer during
subtests instead of custom test_{v,}printf wrappers. That lets
us continue to use stdio in the subtests and dump it on failure
if required.
That would also fix bpf_find_map which currently uses printf to
signal failure (missed during test_printf conversion).
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/xdp_noinline.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/xdp_noinline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c index b5404494b8aa..15f7c272edb0 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_noinline.c | |||
@@ -75,8 +75,8 @@ void test_xdp_noinline(void) | |||
75 | } | 75 | } |
76 | if (bytes != MAGIC_BYTES * NUM_ITER * 2 || pkts != NUM_ITER * 2) { | 76 | if (bytes != MAGIC_BYTES * NUM_ITER * 2 || pkts != NUM_ITER * 2) { |
77 | error_cnt++; | 77 | error_cnt++; |
78 | test__printf("test_xdp_noinline:FAIL:stats %lld %lld\n", | 78 | printf("test_xdp_noinline:FAIL:stats %lld %lld\n", |
79 | bytes, pkts); | 79 | bytes, pkts); |
80 | } | 80 | } |
81 | out: | 81 | out: |
82 | bpf_object__close(obj); | 82 | bpf_object__close(obj); |