Skip to content

selftests/bpf: switch test_progs back to stdio

Stanislav Fomichev bpf netdev 5 versions – Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 1 replyApplied
  2. v43 patches 6 repliesSuperseded
  3. v33 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches0 repliesSuperseded
v13 patches8 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/3selftests/bpf: test_progs: switch to open_memstreamtools/testing/selftests/bpf/test_progs.c tools/testing/selftests/bpf/test_progs.h+62 -560 replies
2/3selftests/bpf: test_progs: test__printf -> printftools/testing/selftests/bpf/prog_tests/bpf_verif_scale.c tools/testing/selftests/bpf/prog_tests/l4lb_all.c tools/testing/selftests/bpf/prog_tests/map_lock.c +7 more+22 -380 replies
3/3selftests/bpf: test_progs: drop extra trailing tabtools/testing/selftests/bpf/test_progs.c+1 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndrii Nakryiko
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH bpf-next v5 0/3] selftests/bpf: switch test_progs back to stdio

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).

Cc Andrii Nakryiko <[email protected]>

Stanislav Fomichev (3):
selftests/bpf: test_progs: switch to open_memstream selftests/bpf: test_progs: test__printf -> printf selftests/bpf: test_progs: drop extra trailing tab

 .../bpf/prog_tests/bpf_verif_scale.c          |   4 +-
 .../selftests/bpf/prog_tests/l4lb_all.c       |   2 +-
 .../selftests/bpf/prog_tests/map_lock.c       |  10 +-
 .../selftests/bpf/prog_tests/send_signal.c    |   4 +-
 .../selftests/bpf/prog_tests/spinlock.c       |   2 +-
 .../bpf/prog_tests/stacktrace_build_id.c      |   4 +-
 .../bpf/prog_tests/stacktrace_build_id_nmi.c  |   4 +-
 .../selftests/bpf/prog_tests/xdp_noinline.c   |   4 +-
 tools/testing/selftests/bpf/test_progs.c      | 131 ++++++++----------
 tools/testing/selftests/bpf/test_progs.h      |  13 +-
 10 files changed, 84 insertions(+), 94 deletions(-)
Signature · 1 line
2.22.0.770.g0f2c4a37fd-goog