Re: [PATCH bpf-next v2 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-03-03 Thread Stanislav Fomichev
On 03/03, Bastien Curutchet (eBPF Foundation) wrote: > A fair amount of code duplication is present among tests to attach BPF > programs. > > Create generic_attach* helpers that attach BPF programs to a given > interface. > Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. > Use th

[PATCH bpf-next v2 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
A fair amount of code duplication is present among tests to attach BPF programs. Create generic_attach* helpers that attach BPF programs to a given interface. Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. Use these helpers in all the available tests. Signed-off-by: Bastien Cur