netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/6] selftests/bpf: integrate test_tcp_check_syncookie.sh into test_progs
@ 2024-10-16 18:35 Alexis Lothoré (eBPF Foundation)
  2024-10-16 18:35 ` [PATCH bpf-next 1/6] selftests/bpf: factorize conn and syncookies tests in a single runner Alexis Lothoré (eBPF Foundation)
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Alexis Lothoré (eBPF Foundation) @ 2024-10-16 18:35 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Mykola Lysenko, Shuah Khan, David S. Miller, Jakub Kicinski,
	Jesper Dangaard Brouer
  Cc: ebpf, Thomas Petazzoni, Lorenz Bauer, bpf, linux-kselftest,
	linux-kernel, netdev, Alexis Lothoré (eBPF Foundation)

Hello,
this series aims to bring test_tcp_check_syncookie.sh scope into
test_progs to make sure that the corresponding tests are also run
automatically in CI. This script tests for bpf_tcp_{gen,check}_syncookie
and bpf_skc_lookup_tcp, in different contexts (ipv4, v6 or dual, and
with tc and xdp programs).
Some other tests like btf_skc_cls_ingress have some overlapping tests with
test_tcp_check_syncookie.sh, so this series moves the missing bits from
test_tcp_check_syncookie.sh into btf_skc_cls_ingress, which is already
integrated into test_progs.
- the first three commits bring some minor improvements to
  btf_skc_cls_ingress without changing its testing scope
- fourth and fifth commits bring test_tcp_check_syncookie.sh features
  into btf_skc_cls_ingress
- last commit removes test_tcp_check_syncookie.sh

The only topic for which I am not sure for this integration is the
necessity or not to run the tests with different program types:
test_tcp_check_syncookie.sh runs tests with both tc and xdp programs, but
btf_skc_cls_ingress currently tests those helpers only with a tc
program. Would it make sense to also make sure that btf_skc_cls_ingress
is tested with all the programs types supported by those helpers ?

The series has been tested both in CI and in a local x86_64 qemu
environment:
  # ./test_progs -a btf_skc_cls_ingress
  #38/1    btf_skc_cls_ingress/conn_ipv4:OK
  #38/2    btf_skc_cls_ingress/conn_ipv6:OK
  #38/3    btf_skc_cls_ingress/conn_dual:OK
  #38/4    btf_skc_cls_ingress/syncookie_ipv4:OK
  #38/5    btf_skc_cls_ingress/syncookie_ipv6:OK
  #38/6    btf_skc_cls_ingress/syncookie_dual:OK
  #38      btf_skc_cls_ingress:OK
  Summary: 1/6 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
---
Alexis Lothoré (eBPF Foundation) (6):
      selftests/bpf: factorize conn and syncookies tests in a single runner
      selftests/bpf: add missing ns cleanups in btf_skc_cls_ingress
      selftests/bpf: get rid of global vars in btf_skc_cls_ingress
      selftests/bpf: add ipv4 and dual ipv4/ipv6 support in btf_skc_cls_ingress
      selftests/bpf: test MSS value returned with bpf_tcp_gen_syncookie
      selftests/bpf: remove test_tcp_check_syncookie

 tools/testing/selftests/bpf/.gitignore             |   1 -
 tools/testing/selftests/bpf/Makefile               |   9 +-
 .../selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 265 +++++++++++++--------
 .../selftests/bpf/progs/test_btf_skc_cls_ingress.c |  83 +++++--
 .../bpf/progs/test_tcp_check_syncookie_kern.c      | 167 -------------
 .../selftests/bpf/test_tcp_check_syncookie.sh      |  85 -------
 .../selftests/bpf/test_tcp_check_syncookie_user.c  | 213 -----------------
 7 files changed, 222 insertions(+), 601 deletions(-)
---
base-commit: 030207b7fce8bad6827615cfc2c6592916e2c336
change-id: 20241015-syncookie-ea7686264586

Best regards,
-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

end of thread, other threads:[~2024-10-19 12:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 18:35 [PATCH bpf-next 0/6] selftests/bpf: integrate test_tcp_check_syncookie.sh into test_progs Alexis Lothoré (eBPF Foundation)
2024-10-16 18:35 ` [PATCH bpf-next 1/6] selftests/bpf: factorize conn and syncookies tests in a single runner Alexis Lothoré (eBPF Foundation)
2024-10-16 18:35 ` [PATCH bpf-next 2/6] selftests/bpf: add missing ns cleanups in btf_skc_cls_ingress Alexis Lothoré (eBPF Foundation)
2024-10-18 23:57   ` Martin KaFai Lau
2024-10-19 12:13     ` Alexis Lothoré
2024-10-16 18:35 ` [PATCH bpf-next 3/6] selftests/bpf: get rid of global vars " Alexis Lothoré (eBPF Foundation)
2024-10-16 18:35 ` [PATCH bpf-next 4/6] selftests/bpf: add ipv4 and dual ipv4/ipv6 support " Alexis Lothoré (eBPF Foundation)
2024-10-19  0:30   ` Martin KaFai Lau
2024-10-19 12:43     ` Alexis Lothoré
2024-10-16 18:35 ` [PATCH bpf-next 5/6] selftests/bpf: test MSS value returned with bpf_tcp_gen_syncookie Alexis Lothoré (eBPF Foundation)
2024-10-16 18:35 ` [PATCH bpf-next 6/6] selftests/bpf: remove test_tcp_check_syncookie Alexis Lothoré (eBPF Foundation)
2024-10-19  0:34   ` Martin KaFai Lau

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