All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Sitnicki <jakub@cloudflare.com>
To: bpf@vger.kernel.org
Cc: Martin Lau <kafai@fb.com>, kernel-team@cloudflare.com
Subject: [PATCH bpf-next 00/10] Switch reuseport tests for test_progs framework
Date: Thu, 12 Dec 2019 11:22:49 +0100	[thread overview]
Message-ID: <20191212102259.418536-1-jakub@cloudflare.com> (raw)

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


             reply	other threads:[~2019-12-12 10:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 10:22 Jakub Sitnicki [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191212102259.418536-1-jakub@cloudflare.com \
    --to=jakub@cloudflare.com \
    --cc=bpf@vger.kernel.org \
    --cc=kafai@fb.com \
    --cc=kernel-team@cloudflare.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.