selftests/bpf: re-split main function into dedicated tests
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Wed, 20 Nov 2024 07:43:14 +0000 (08:43 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 2 Dec 2024 16:41:16 +0000 (08:41 -0800)
commit2b044dd186f0f378894f1e590d62325cbbf9b085
treef0c71920251ab3c72039f7777652c73f51411d59
parent28494d6a277ebe5b9a5b1313b1f1ee396b890e35
selftests/bpf: re-split main function into dedicated tests

The flow_dissector runs plenty of tests over diffent kind of packets,
grouped into three categories: skb mode, non-skb mode with direct
attach, and non-skb with indirect attach.

Re-split the main function into dedicated tests. Each test now must have
its own setup/teardown, but for the advantage of being able to run them
separately. While at it, make sure that tests attaching the bpf programs
are run in a dedicated ns.

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20241120-flow_dissector-v3-4-45b46494f937@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c