Message ID | 20250219-b4-tc_links-v2-0-14504db136b7@bootlin.com (mailing list archive) |
---|---|
Headers | show |
Series | selftests/bpf: tc_links/tc_opts: Unserialize tests | expand |
On 02/19, Bastien Curutchet (eBPF Foundation) wrote: > Hi all, > > Both tc_links.c and tc_opts.c do their tests on the loopback interface. > It prevents from parallelizing their executions. > > Add a new behaviour to the test_progs framework that creates and opens a > new network namespace to run a test in it. This is done automatically on > tests whose names start with 'ns_'. > > One test already has a name starting with 'ns_', so PATCH 1 renames it > to avoid conflicts. PATCH 2 introduces the test_progs 'feature'. > PATCH 3 & 4 convert some tests to use these dedicated namespaces. > > Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> > --- > Changes in v2: > - Handle the netns creation / opening directly in test_progs > - Link to v1: https://lore.kernel.org/bpf/e3838d93-04e3-4e96-af53-e9e63550d7ba@bootlin.com Acked-by: Stanislav Fomichev <sdf@fomichev.me> Thanks, looks very nice!
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <ast@kernel.org>: On Wed, 19 Feb 2025 15:52:59 +0100 you wrote: > Hi all, > > Both tc_links.c and tc_opts.c do their tests on the loopback interface. > It prevents from parallelizing their executions. > > Add a new behaviour to the test_progs framework that creates and opens a > new network namespace to run a test in it. This is done automatically on > tests whose names start with 'ns_'. > > [...] Here is the summary with links: - [bpf-next,v2,1/4] selftests/bpf: ns_current_pid_tgid: Rename the test function https://git.kernel.org/bpf/bpf-next/c/4a06c5251ae3 - [bpf-next,v2,2/4] selftests/bpf: Optionally open a dedicated namespace to run test in it https://git.kernel.org/bpf/bpf-next/c/c047e0e0e435 - [bpf-next,v2,3/4] selftests/bpf: tc_links/tc_opts: Unserialize tests https://git.kernel.org/bpf/bpf-next/c/207cd7578ad1 - [bpf-next,v2,4/4] selftests/bpf: ns_current_pid_tgid: Use test_progs's ns_ feature https://git.kernel.org/bpf/bpf-next/c/157feaaf18ce You are awesome, thank you!
Hi all, Both tc_links.c and tc_opts.c do their tests on the loopback interface. It prevents from parallelizing their executions. Add a new behaviour to the test_progs framework that creates and opens a new network namespace to run a test in it. This is done automatically on tests whose names start with 'ns_'. One test already has a name starting with 'ns_', so PATCH 1 renames it to avoid conflicts. PATCH 2 introduces the test_progs 'feature'. PATCH 3 & 4 convert some tests to use these dedicated namespaces. Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> --- Changes in v2: - Handle the netns creation / opening directly in test_progs - Link to v1: https://lore.kernel.org/bpf/e3838d93-04e3-4e96-af53-e9e63550d7ba@bootlin.com --- Bastien Curutchet (eBPF Foundation) (4): selftests/bpf: ns_current_pid_tgid: Rename the test function selftests/bpf: Optionally open a dedicated namespace to run test in it selftests/bpf: tc_links/tc_opts: Unserialize tests selftests/bpf: ns_current_pid_tgid: Use test_progs's ns_ feature .../selftests/bpf/prog_tests/ns_current_pid_tgid.c | 47 ++++++++-------------- tools/testing/selftests/bpf/prog_tests/tc_links.c | 28 ++++++------- tools/testing/selftests/bpf/prog_tests/tc_opts.c | 40 +++++++++--------- tools/testing/selftests/bpf/test_progs.c | 12 ++++++ 4 files changed, 63 insertions(+), 64 deletions(-) --- base-commit: a814b9be27fb3c3f49343aee4b015b76f5875558 change-id: 20250219-b4-tc_links-b6d5bf709e1f Best regards,