[PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests

Bastien Curutchet (eBPF Foundation) posted 3 patches 10 months ago
There is a newer version of this series
.../testing/selftests/bpf/prog_tests/tc_helpers.h  |  12 ++
tools/testing/selftests/bpf/prog_tests/tc_links.c  | 164 +++++++++++++--
tools/testing/selftests/bpf/prog_tests/tc_opts.c   | 230 ++++++++++++++++++---
3 files changed, 361 insertions(+), 45 deletions(-)
Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests
Posted by Stanislav Fomichev 10 months ago
On 02/17, 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.
> 
> Use namespaces and the new append_tid() helper to allow this
> parallelization.
> 
> Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>

Acked-by: Stanislav Fomichev <sdf@fomichev.me>

LGTM, thank you! Optionally, if there is more to convert, we can think
about moving create_and_open_tid_ns to the test_progs itself. For example,
if the test name starts with ns_, test_progs can probably do the
create_and_open_tid_ns/netns_free part?
Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests
Posted by Alexei Starovoitov 10 months ago
On Tue, Feb 18, 2025 at 1:22 PM Stanislav Fomichev <stfomichev@gmail.com> wrote:
>
> On 02/17, 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.
> >
> > Use namespaces and the new append_tid() helper to allow this
> > parallelization.
> >
> > Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
>
> Acked-by: Stanislav Fomichev <sdf@fomichev.me>
>
> LGTM, thank you! Optionally, if there is more to convert, we can think
> about moving create_and_open_tid_ns to the test_progs itself. For example,
> if the test name starts with ns_, test_progs can probably do the
> create_and_open_tid_ns/netns_free part?

That's a good idea.
Let's do it now.
Otherwise most of the patch 2 will be reverted when it's introduced.

pw-bot: cr
Re: [PATCH bpf-next 0/3] selftests/bpf: tc_links/tc_opts: Unserialize tests
Posted by Bastien Curutchet 10 months ago
Hi,

On 2/19/25 4:40 AM, Alexei Starovoitov wrote:
> On Tue, Feb 18, 2025 at 1:22 PM Stanislav Fomichev <stfomichev@gmail.com> wrote:
>>
>> On 02/17, 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.
>>>
>>> Use namespaces and the new append_tid() helper to allow this
>>> parallelization.
>>>
>>> Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
>>
>> Acked-by: Stanislav Fomichev <sdf@fomichev.me>
>>
>> LGTM, thank you! Optionally, if there is more to convert, we can think
>> about moving create_and_open_tid_ns to the test_progs itself. For example,
>> if the test name starts with ns_, test_progs can probably do the
>> create_and_open_tid_ns/netns_free part?
> 
> That's a good idea.
> Let's do it now.
> Otherwise most of the patch 2 will be reverted when it's introduced.
> 

Ok, I'll send a V2 with this in test_progs.


Best regards,
Bastien