Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-06 Thread Jakub Sitnicki
On Tue, Aug 06, 2024 at 07:18 PM +02, Michal Luczaj wrote: > On 8/6/24 14:01, Jakub Sitnicki wrote: >> On Wed, Jul 31, 2024 at 12:01 PM +02, Michal Luczaj wrote: >>> Series takes care of few bugs and missing features with the aim to improve >>> the test coverage of soc

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-06 Thread Jakub Sitnicki
rs.h | 149 > ++--- > .../selftests/bpf/prog_tests/sockmap_listen.c | 117 ++-- > 3 files changed, 124 insertions(+), 170 deletions(-) > --- > base-commit: 92cc2456e9775dc4333fb4aa430763ae4ac2f2d9 > change-id: 20240729-selftest-sockmap-fixes-bcca996

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-08-05 Thread Jakub Sitnicki
On Wed, Jul 31, 2024 at 12:01 PM +02, Michal Luczaj wrote: > Series takes care of few bugs and missing features with the aim to improve > the test coverage of sockmap/sockhash. > > Last patch is a create_pair() rewrite making use of > __attribute__((cleanup)) to handle socket fd lifetime. > >

Re: [PATCH bpf 1/6] selftest/bpf: Support more socket types in create_pair()

2024-07-30 Thread Jakub Sitnicki
On Fri, Jul 26, 2024 at 10:29 PM +02, Michal Luczaj wrote: > On 7/26/24 19:23, Jakub Sitnicki wrote: >> I was going to suggest that a single return path for success is better >> than two (diff below), but I see that this is what you ended up with >> after patch 6. >>

Re: [PATCH bpf 0/6] selftest/bpf: Various sockmap-related fixes

2024-07-26 Thread Jakub Sitnicki
On Wed, Jul 24, 2024 at 01:32 PM +02, Michal Luczaj wrote: > Series takes care of few bugs and missing features with the aim to improve > the test coverage of sockmap/sockhash. > > Last patch is a create_pair() rewrite making use of > __attribute__((cleanup)) to handle socket fd lifetime. > > v0:

Re: [PATCH bpf 6/6] selftest/bpf: Introduce __attribute__((cleanup)) in create_pair()

2024-07-26 Thread Jakub Sitnicki
will > remain valid. > > Suggested-by: Jakub Sitnicki > Signed-off-by: Michal Luczaj > --- > .../selftests/bpf/prog_tests/sockmap_helpers.h | 57 > -- > 1 file changed, 32 insertions(+), 25 deletions(-) > > diff --git a/tools/testing/selftests/bp

Re: [PATCH bpf 1/6] selftest/bpf: Support more socket types in create_pair()

2024-07-26 Thread Jakub Sitnicki
On Wed, Jul 24, 2024 at 01:32 PM +02, Michal Luczaj wrote: > Extend the function to allow creating socket pairs of SOCK_STREAM, > SOCK_DGRAM and SOCK_SEQPACKET. > > Adapt direct callers and leave further cleanups for the following patch. > > Suggested-by: Jakub Sitnicki >

Re: [PATCH bpf-next 3/8] selftests/bpf: Use bpf_link attachments in test_sockmap

2024-05-31 Thread Jakub Sitnicki
On Thu, May 30, 2024 at 04:45 PM -07, John Fastabend wrote: > Geliang Tang wrote: >> On Mon, 2024-05-27 at 21:36 +0200, Jakub Sitnicki wrote: >> > On Mon, May 27, 2024 at 10:12 AM -07, John Fastabend wrote: >> > > Geliang Tang wrote: [...] >> > > The on

Re: [PATCH bpf-next 0/8] fixes for test_sockmap

2024-05-31 Thread Jakub Sitnicki
ftests/bpf/progs/test_sockmap_kern.h | 3 - > tools/testing/selftests/bpf/test_sockmap.c| 101 +- > 2 files changed, 51 insertions(+), 53 deletions(-) Tested-by: Jakub Sitnicki

Re: [PATCH bpf-next 3/8] selftests/bpf: Use bpf_link attachments in test_sockmap

2024-05-27 Thread Jakub Sitnicki
On Mon, May 27, 2024 at 10:12 AM -07, John Fastabend wrote: > Geliang Tang wrote: >> From: Geliang Tang >> >> Switch attachments to bpf_link using bpf_program__attach_sockmap() instead >> of bpf_prog_attach(). > > Sorry it took me a few days to get to this. > > Is there a reason to push this to

Re: [PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap

2024-05-22 Thread Jakub Sitnicki
On Tue, May 21, 2024 at 06:20 PM GMT, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to bpf/bpf-next.git (master) > by Andrii Nakryiko : > > On Fri, 17 May 2024 14:21:46 +0800 you wrote: >> From: Geliang Tang >> >> bpf_prog5 and bpf_prog7 are removed from

Re: [PATCH bpf-next v5 1/2] selftests/bpf: Check recv lengths in test_sockmap

2024-04-29 Thread Jakub Sitnicki
On Tue, Apr 23, 2024 at 06:26 PM +08, Geliang Tang wrote: > From: Geliang Tang > > The values of recv and recvp in msg_loop may be negative, so it's necessary > to check if they are positive before using them. > > Fixes: 16962b2404ac ("bpf: sockmap, add selftests") > Fixes: 753fb2ee0934 ("bpf:

Re: [PATCH bpf-next] selftests/bpf: Add F_SETFL for fcntl

2024-04-03 Thread Jakub Sitnicki
Hi Geliang, On Wed, Apr 03, 2024 at 04:32 PM +08, Geliang Tang wrote: > From: Geliang Tang > > Incorrect arguments are passed to fcntl() in test_sockmap.c when invoking > it to set file status flags. If O_NONBLOCK is used as 2nd argument and > passed into fcntl, -EINVAL will be returned (See

Re: [PATCH v4 12/12] selftests: ip_local_port_range: use XFAIL instead of SKIP

2024-03-01 Thread Jakub Sitnicki
On Thu, Feb 29, 2024 at 06:25 PM -05, Xin Long wrote: > On Thu, Feb 29, 2024 at 3:27 PM Jakub Sitnicki wrote: >> >> On Wed, Feb 28, 2024 at 04:59 PM -08, Jakub Kicinski wrote: >> > SCTP does not support IP_LOCAL_PORT_RANGE and we know it, >> > so use XFAIL in

Re: [PATCH v4 12/12] selftests: ip_local_port_range: use XFAIL instead of SKIP

2024-02-29 Thread Jakub Sitnicki
On Wed, Feb 28, 2024 at 04:59 PM -08, Jakub Kicinski wrote: > SCTP does not support IP_LOCAL_PORT_RANGE and we know it, > so use XFAIL instead of SKIP. > > Reviewed-by: Kees Cook > Signed-off-by: Jakub Kicinski > --- > tools/testing/selftests/net/ip_local_port_range.c | 6 +++--- > 1 file

Re: [PATCH net-next 3/4] selftests: kselftest_harness: support using xfail

2024-02-14 Thread Jakub Sitnicki
On Wed, Feb 14, 2024 at 08:40 PM +01, Jakub Sitnicki wrote: [...] > On second thought, if I can suggest a follow up change so this: > > ok 17 # XFAIL SCTP doesn't support IP_BIND_ADDRESS_NO_PORT > > ... becomes this > > ok 17 ip_local_port_range.ip4_stcp.late_bind # XFAIL

Re: [PATCH net-next 3/4] selftests: kselftest_harness: support using xfail

2024-02-14 Thread Jakub Sitnicki
On Tue, Feb 13, 2024 at 07:44 AM -08, Jakub Kicinski wrote: > Selftest summary includes XFAIL but there's no way to use > it from within the harness. Support it in a similar way to skip. > > Currently tests report skip for things they expect to fail > e.g. when given combination of parameters is

Re: [PATCH net-next 0/4] selftests: kselftest_harness: support using xfail

2024-02-14 Thread Jakub Sitnicki
52 insertions(+), 17 deletions(-) Nice! We've been ignoring skipped tests in our internal CI. But this is the wrong approach, as you point out. For the series: Tested-by: Jakub Sitnicki

Re: [PATCH net] selftests: fill in some missing configs for net

2024-01-23 Thread Jakub Sitnicki
On Mon, Jan 22, 2024 at 12:35 PM -08, Jakub Kicinski wrote: > We are missing a lot of config options from net selftests, > it seems: > > tun/tap: CONFIG_TUN, CONFIG_MACVLAN, CONFIG_MACVTAP > fib_tests: CONFIG_NET_SCH_FQ_CODEL > l2tp:CONFIG_L2TP, CONFIG_L2TP_V3, CONFIG_L2TP_IP,

Re: [PATCH bpf-next v2 2/2] selftests/bpf: Add pairs_redir_to_connected helper

2023-10-13 Thread Jakub Sitnicki
On Thu, Oct 05, 2023 at 10:18 PM -07, Martin KaFai Lau wrote: > On 10/5/23 12:21 AM, Geliang Tang wrote: >> --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c >> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c >> @@ -1336,32 +1336,22 @@ static void test_redir(struct