Skip to contentSkip to conversation

selftests: add selftest for UDP SO_PEEK_OFF support

PATCH Applied Jason Xing 2 participants 2 messages Sep 2, 2024 – Sep 4, 2024

Subsystems (3)
lore
Share & tools
lore

Jason Xing

author
#0 lore raw

PATCH v2 1/1 selftests: add selftest for UDP SO_PEEK_OFF support

From: Jason Xing <[email protected]>

Add the SO_PEEK_OFF selftest for UDP. In this patch, I mainly do three things:
1. rename tcp_so_peek_off.c
2. adjust for UDP protocol
3. add selftests into it

---
v2

1. update .gitignore (Stanislav)
2. use connect() < 0 as the test statement (Willem)

v1

---
 tools/testing/selftests/net/.gitignore        |  1 +
 tools/testing/selftests/net/Makefile          |  2 +-
 .../{tcp_so_peek_off.c => sk_so_peek_off.c}   | 91 +++++++++++--------
 3 files changed, 57 insertions(+), 37 deletions(-)
 rename tools/testing/selftests/net/{tcp_so_peek_off.c => sk_so_peek_off.c} (58%)
tools/testing/selftests/net/.gitignore +1 -0
index 666ab7d9390b..923bf098e2eb 100644
@@ -34,6 +34,7 @@ scm_pidfd
 scm_rights
 sk_bind_sendto_listen
 sk_connect_zero_addr
+sk_so_peek_off
 socket
 so_incoming_cpu
 so_netns_cookie
tools/testing/selftests/net/Makefile +1 -1
index 1179e3261bef..d5029f978aa9 100644
@@ -80,7 +80,7 @@ TEST_PROGS += io_uring_zerocopy_tx.sh
 TEST_GEN_FILES += bind_bhash
 TEST_GEN_PROGS += sk_bind_sendto_listen
 TEST_GEN_PROGS += sk_connect_zero_addr
-TEST_GEN_PROGS += tcp_so_peek_off
+TEST_GEN_PROGS += sk_so_peek_off
 TEST_PROGS += test_ingress_egress_chaining.sh
 TEST_GEN_PROGS += so_incoming_cpu
 TEST_PROGS += sctp_vrf.sh
tools/testing/selftests/net/sk_so_peek_off.c renamed from tools/testing/selftests/net/tcp_so_peek_off.c +55 -36

213 lines not on this page · raw message

Signature · 1 line
2.37.3
#1 lore raw
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 9 lines · On Tue, 3 Sep 2024 00:06:10 +0800 you wrote:

From: Jason Xing <[email protected]>

Add the SO_PEEK_OFF selftest for UDP. In this patch, I mainly do three things:
1. rename tcp_so_peek_off.c
2. adjust for UDP protocol
3. add selftests into it

[...]

Here is the summary with links:
- [net-next,v2] selftests: add selftest for UDP SO_PEEK_OFF support

    https://git.kernel.org/netdev/net-next/c/5c26516f0903

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html