public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] selftests/bpf: migrate test_flow_dissector.sh to test_progs
@ 2024-11-13 13:53 Alexis Lothoré (eBPF Foundation)
  2024-11-13 13:53 ` [PATCH bpf-next 01/10] selftests/bpf: add a macro to compare raw memory Alexis Lothoré (eBPF Foundation)
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Alexis Lothoré (eBPF Foundation) @ 2024-11-13 13:53 UTC (permalink / raw)
  To: Andrii Nakryiko, Eduard Zingerman, Mykola Lysenko,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan
  Cc: ebpf, Thomas Petazzoni, Bastien Curutchet, Petar Penkov, bpf,
	linux-kselftest, linux-kernel,
	Alexis Lothoré (eBPF Foundation)

Hello,
this new series aims to migrate test_flow_dissector.sh into test_progs.
There are 2 "main" parts in test_flow_dissector.sh:
- a set of tests checking flow_dissector programs attachment to either
  root namespace or non-root namespace
- dissection test

The first set is integrated in flow_dissector.c, which already contains
some existing tests for flow_dissector programs. This series uses the
opportunity to update a bit this file (use new assert, re-split tests,
etc)
The second part is migrated into a new file under test_progs,
flow_dissector_classification.c. It uses the same eBPF programs as
flow_dissector.c, but the difference is rather about how those program
are executed:
- flow_dissector.c manually runs programs with BPF_PROG_RUN
- flow_dissector_classification.c sends real packets to be dissected, and
  so it also executes kernel code related to eBPF flow dissector (eg:
__skb_flow_bpf_to_target)

---
Alexis Lothoré (eBPF Foundation) (10):
      selftests/bpf: add a macro to compare raw memory
      selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys
      selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test
      selftests/bpf: re-split main function into dedicated tests
      selftests/bpf: expose all subtests from flow_dissector
      selftests/bpf: add gre packets testing to flow_dissector
      selftests/bpf: migrate flow_dissector namespace exclusivity test
      selftests/bpf: Enable generic tc actions in selftests config
      selftests/bpf: migrate bpf flow dissectors tests to test_progs
      selftests/bpf: remove test_flow_dissector.sh

 tools/testing/selftests/bpf/.gitignore             |   1 -
 tools/testing/selftests/bpf/Makefile               |   3 +-
 tools/testing/selftests/bpf/config                 |   1 +
 .../selftests/bpf/prog_tests/flow_dissector.c      | 307 ++++++--
 .../bpf/prog_tests/flow_dissector_classification.c | 851 +++++++++++++++++++++
 tools/testing/selftests/bpf/test_flow_dissector.c  | 780 -------------------
 tools/testing/selftests/bpf/test_flow_dissector.sh | 178 -----
 tools/testing/selftests/bpf/test_progs.h           |  25 +
 8 files changed, 1107 insertions(+), 1039 deletions(-)
---
base-commit: 16e1d1c377aa4c56223701a31f3bfa88505e7e4f
change-id: 20241019-flow_dissector-3eb0c07fc163

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


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

end of thread, other threads:[~2024-11-14  8:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13 13:53 [PATCH bpf-next 00/10] selftests/bpf: migrate test_flow_dissector.sh to test_progs Alexis Lothoré (eBPF Foundation)
2024-11-13 13:53 ` [PATCH bpf-next 01/10] selftests/bpf: add a macro to compare raw memory Alexis Lothoré (eBPF Foundation)
2024-11-13 17:31   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 02/10] selftests/bpf: use ASSERT_MEMEQ to compare bpf flow keys Alexis Lothoré (eBPF Foundation)
2024-11-13 17:32   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 03/10] selftests/bpf: replace CHECK calls with ASSERT macros in flow_dissector test Alexis Lothoré (eBPF Foundation)
2024-11-13 17:34   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 04/10] selftests/bpf: re-split main function into dedicated tests Alexis Lothoré (eBPF Foundation)
2024-11-13 17:42   ` Stanislav Fomichev
2024-11-14  7:57     ` Alexis Lothoré
2024-11-13 13:53 ` [PATCH bpf-next 05/10] selftests/bpf: expose all subtests from flow_dissector Alexis Lothoré (eBPF Foundation)
2024-11-13 17:43   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 06/10] selftests/bpf: add gre packets testing to flow_dissector Alexis Lothoré (eBPF Foundation)
2024-11-13 17:46   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 07/10] selftests/bpf: migrate flow_dissector namespace exclusivity test Alexis Lothoré (eBPF Foundation)
2024-11-13 14:23   ` Alexis Lothoré
2024-11-13 17:50     ` Stanislav Fomichev
2024-11-14  7:58       ` Alexis Lothoré
2024-11-13 13:53 ` [PATCH bpf-next 08/10] selftests/bpf: Enable generic tc actions in selftests config Alexis Lothoré (eBPF Foundation)
2024-11-13 17:51   ` Stanislav Fomichev
2024-11-13 13:53 ` [PATCH bpf-next 09/10] selftests/bpf: migrate bpf flow dissectors tests to test_progs Alexis Lothoré (eBPF Foundation)
2024-11-13 17:58   ` Stanislav Fomichev
2024-11-14  8:04     ` Alexis Lothoré
2024-11-13 13:53 ` [PATCH bpf-next 10/10] selftests/bpf: remove test_flow_dissector.sh Alexis Lothoré (eBPF Foundation)
2024-11-13 17:59   ` Stanislav Fomichev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox