bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] Switch reuseport tests for test_progs framework
@ 2019-12-12 10:22 Jakub Sitnicki
  2019-12-12 10:22 ` [PATCH bpf-next 01/10] libbpf: Recognize SK_REUSEPORT programs from section name Jakub Sitnicki
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ messages in thread
From: Jakub Sitnicki @ 2019-12-12 10:22 UTC (permalink / raw)
  To: bpf; +Cc: Martin Lau, kernel-team

This change has been suggested by Martin Lau [0] during a review of a
related patch set that extends reuseport tests [1].

Patches 1 & 2 address a warning due to unrecognized section name from
libbpf when running reuseport tests. We don't want to carry this warning
into test_progs.

Patches 3-8 massage the reuseport tests to ease the switch to test_progs
framework. The intention here is to show the work. Happy to squash these,
if needed.

Patches 9-10 do the actual move and conversion to test_progs.

Output from a test_progs run after changes pasted below.

Thanks,
Jakub

[0] https://lore.kernel.org/bpf/20191123110751.6729-1-jakub@cloudflare.com/T/#m607d822caeb1eb5db101172821a78cc3896ff1c3
[1] https://lore.kernel.org/bpf/20191123110751.6729-1-jakub@cloudflare.com/T/#m55881bae9fb6e34837d07a0c0a7ffbc138f8d06f

---8<---
bash-5.0# ./test_progs -t select_reuseport
#33/1 IPv4/TCP LOOPBACK test_err_inner_map:OK
#33/2 IPv4/TCP LOOPBACK test_err_skb_data:OK
#33/3 IPv4/TCP LOOPBACK test_err_sk_select_port:OK
#33/4 IPv4/TCP LOOPBACK test_pass:OK
#33/5 IPv4/TCP LOOPBACK test_syncookie:OK
#33/6 IPv4/TCP LOOPBACK test_pass_on_err:OK
#33/7 IPv4/TCP LOOPBACK test_detach_bpf:OK
#33/8 IPv4/TCP INANY test_err_inner_map:OK
#33/9 IPv4/TCP INANY test_err_skb_data:OK
#33/10 IPv4/TCP INANY test_err_sk_select_port:OK
#33/11 IPv4/TCP INANY test_pass:OK
#33/12 IPv4/TCP INANY test_syncookie:OK
#33/13 IPv4/TCP INANY test_pass_on_err:OK
#33/14 IPv4/TCP INANY test_detach_bpf:OK
#33/15 IPv6/TCP LOOPBACK test_err_inner_map:OK
#33/16 IPv6/TCP LOOPBACK test_err_skb_data:OK
#33/17 IPv6/TCP LOOPBACK test_err_sk_select_port:OK
#33/18 IPv6/TCP LOOPBACK test_pass:OK
#33/19 IPv6/TCP LOOPBACK test_syncookie:OK
#33/20 IPv6/TCP LOOPBACK test_pass_on_err:OK
#33/21 IPv6/TCP LOOPBACK test_detach_bpf:OK
#33/22 IPv6/TCP INANY test_err_inner_map:OK
#33/23 IPv6/TCP INANY test_err_skb_data:OK
#33/24 IPv6/TCP INANY test_err_sk_select_port:OK
#33/25 IPv6/TCP INANY test_pass:OK
#33/26 IPv6/TCP INANY test_syncookie:OK
#33/27 IPv6/TCP INANY test_pass_on_err:OK
#33/28 IPv6/TCP INANY test_detach_bpf:OK
#33/29 IPv4/UDP LOOPBACK test_err_inner_map:OK
#33/30 IPv4/UDP LOOPBACK test_err_skb_data:OK
#33/31 IPv4/UDP LOOPBACK test_err_sk_select_port:OK
#33/32 IPv4/UDP LOOPBACK test_pass:OK
#33/33 IPv4/UDP LOOPBACK test_syncookie:OK
#33/34 IPv4/UDP LOOPBACK test_pass_on_err:OK
#33/35 IPv4/UDP LOOPBACK test_detach_bpf:OK
#33/36 IPv6/UDP LOOPBACK test_err_inner_map:OK
#33/37 IPv6/UDP LOOPBACK test_err_skb_data:OK
#33/38 IPv6/UDP LOOPBACK test_err_sk_select_port:OK
#33/39 IPv6/UDP LOOPBACK test_pass:OK
#33/40 IPv6/UDP LOOPBACK test_syncookie:OK
#33/41 IPv6/UDP LOOPBACK test_pass_on_err:OK
#33/42 IPv6/UDP LOOPBACK test_detach_bpf:OK
#33 select_reuseport:OK
Summary: 1/42 PASSED, 0 SKIPPED, 0 FAILED
--->8---


Jakub Sitnicki (10):
  libbpf: Recognize SK_REUSEPORT programs from section name
  selftests/bpf: Let libbpf determine program type from section name
  selftests/bpf: Use sa_family_t everywhere in reuseport tests
  selftests/bpf: Add helpers for getting socket family & type name
  selftests/bpf: Unroll the main loop in reuseport test
  selftests/bpf: Run reuseport tests in a loop
  selftests/bpf: Propagate errors during setup for reuseport tests
  selftests/bpf: Pull up printing the test name into test runner
  selftests/bpf: Move reuseport tests under prog_tests/
  selftests/bpf: Switch reuseport tests for test_progs framework

 tools/lib/bpf/libbpf.c                        |   1 +
 tools/testing/selftests/bpf/Makefile          |   2 +-
 .../select_reuseport.c}                       | 514 ++++++++++--------
 .../bpf/progs/test_select_reuseport_kern.c    |   2 +-
 4 files changed, 292 insertions(+), 227 deletions(-)
 rename tools/testing/selftests/bpf/{test_select_reuseport.c => prog_tests/select_reuseport.c} (54%)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-12-13 20:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 10:22 [PATCH bpf-next 00/10] Switch reuseport tests for test_progs framework Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 01/10] libbpf: Recognize SK_REUSEPORT programs from section name Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 02/10] selftests/bpf: Let libbpf determine program type " Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 03/10] selftests/bpf: Use sa_family_t everywhere in reuseport tests Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 04/10] selftests/bpf: Add helpers for getting socket family & type name Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 05/10] selftests/bpf: Unroll the main loop in reuseport test Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 06/10] selftests/bpf: Run reuseport tests in a loop Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 07/10] selftests/bpf: Propagate errors during setup for reuseport tests Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 08/10] selftests/bpf: Pull up printing the test name into test runner Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 09/10] selftests/bpf: Move reuseport tests under prog_tests/ Jakub Sitnicki
2019-12-12 10:22 ` [PATCH bpf-next 10/10] selftests/bpf: Switch reuseport tests for test_progs framework Jakub Sitnicki
2019-12-13  5:36 ` [PATCH bpf-next 00/10] " Alexei Starovoitov
2019-12-13 16:30   ` Martin Lau
2019-12-13 20:41     ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).