Re: [PATCH net-next] selftests: net/psock_lib: Handle EINTR and EAGAIN

2024-11-20 Thread Leo Stone
Willem de Bruijn wrote: > Did you observe actual issues or is this based on the comment in the > existing code ("Should really handle EINTR and EAGAIN"). No, this patch was based purely off of the comment, and the examples of similar code in other selftests, e.g. tools/testing/selftests/bpf/xsk.c:

[PATCH net-next] selftests: net/psock_lib: Handle EINTR and EAGAIN

2024-11-17 Thread Leo Stone
Make pair_udp_send_char handle EAGAIN, EINTR, and partial reads or writes. Signed-off-by: Leo Stone --- tools/testing/selftests/net/psock_lib.h | 39 +++-- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/net/psock_lib.h b/tools/testing

[PATCH net-next v3] selftest/tcp-ao: Add filter tests

2024-10-21 Thread Leo Stone
d > # ok 118 filter keys: correct nkeys when in.nkeys < matches Acked-by: Dmitry Safonov <0x7f454...@gmail.com> Signed-off-by: Leo Stone --- v3: - Ordered locals in reverse xmas tree order - Separated socket fd declaration from assignment - Broke lines longer than 80 columns v2:

[PATCH v2] selftest/tcp-ao: Add filter tests

2024-10-15 Thread Leo Stone
d > # ok 118 filter keys: correct nkeys when in.nkeys < matched_keys Signed-off-by: Leo Stone --- Changes in v2: - Changed 2 unnecessary test_error calls to test_fail - Added another test to make sure getsockopt returns the right nkeys value when the input nkeys is smaller than the numbe

[RFC PATCH] selftest/tcp-ao: Add filter tests

2024-10-14 Thread Leo Stone
Signed-off-by: Leo Stone --- This patch is meant to address the TODO in setsockopt-closed.c: > /* > * TODO: check getsockopt(TCP_AO_GET_KEYS) with different filters > * returning proper nr & keys; > */ Is this a reasonable way to do these tests? If so, what cases should I add? -