Skip to contentSkip to conversation

selftest: af_unix: Misc updates.

PATCH Applied Kuniyuki Iwashima 2 participants 4 messages Nov 24, 2025 – Nov 26, 2025

Subsystems (4)
lore
Share & tools
lore

Kuniyuki Iwashima

author maintainer
#0 lore raw

v2 cover selftest: af_unix: Misc updates.

Patch 1 add .gitignore under tools/testing/selftests/net/af_unix/.

Patch 2 make so_peek_off.c less flaky.

Changes:
v2: Rebased on clean net-next
v1: https://lore.kernel.org/netdev/[email protected]/

Kuniyuki Iwashima (2):
selftest: af_unix: Create its own .gitignore.
selftest: af_unix: Extend recv() timeout in so_peek_off.c.

 tools/testing/selftests/net/.gitignore            | 8 --------
 tools/testing/selftests/net/af_unix/.gitignore    | 8 ++++++++
 tools/testing/selftests/net/af_unix/so_peek_off.c | 4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)
 create mode 100644 tools/testing/selftests/net/af_unix/.gitignore
Signature · 1 line
2.52.0.460.gd25c4c69ec-goog
author maintainer
#1 lore raw

PATCH v2 1/2 selftest: af_unix: Create its own .gitignore.

Somehow AF_UNIX tests have reused ../.gitignore,
but now NIPA warns about it.

Let's create .gitignore under af_unix/.

---
 tools/testing/selftests/net/.gitignore         | 8 --------
 tools/testing/selftests/net/af_unix/.gitignore | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)
 create mode 100644 tools/testing/selftests/net/af_unix/.gitignore
tools/testing/selftests/net/.gitignore +0 -8
index 283ca5ffc244..6930fe926c58 100644
@@ -4,7 +4,6 @@ bind_timewait
 bind_wildcard
 busy_poller
 cmsg_sender
-diag_uid
 epoll_busy_poll
 fin_ack_lat
 hwtstamp_config
@@ -17,7 +16,6 @@ ipv6_flowlabel
 ipv6_flowlabel_mgr
 ipv6_fragmentation
 log.txt
-msg_oob
 msg_zerocopy
 netlink-dumps
 nettest
@@ -34,9 +32,6 @@ reuseport_bpf_numa
 reuseport_dualstack
 rxtimestamp
 sctp_hello
-scm_inq
-scm_pidfd
-scm_rights
 sk_bind_sendto_listen
 sk_connect_zero_addr
 sk_so_peek_off
@@ -44,7 +39,6 @@ skf_net_off
 socket
 so_incoming_cpu
 so_netns_cookie
-so_peek_off
 so_txtime
 so_rcv_listener
 stress_reuseport_listen
@@ -63,5 +57,3 @@ txtimestamp
 udpgso
 udpgso_bench_rx
 udpgso_bench_tx
-unix_connect
-unix_connreset
tools/testing/selftests/net/af_unix/.gitignore new file +8 -0
new file mode 100644
index 000000000000..240b26740c9e
@@ -0,0 +1,8 @@
+diag_uid
+msg_oob
+scm_inq
+scm_pidfd
+scm_rights
+so_peek_off
+unix_connect
+unix_connreset
Signature · 1 line
2.52.0.460.gd25c4c69ec-goog
author maintainer
#2 lore raw

PATCH v2 2/2 selftest: af_unix: Extend recv() timeout in so_peek_off.c.

In reply to Kuniyuki Iwashima

so_peek_off.c is reported to be flaky on NIPA:

# # so_peek_off.c:149:two_chunks_overlap_blocking:Expected -1 (-1) != bytes (-1) # # two_chunks_overlap_blocking: Test terminated by assertion
# # FAIL so_peek_off.stream.two_chunks_overlap_blocking

The test fork()s a child process to send() data after 1ms to wake up the parent process being blocked (up to 3ms) on recv().

But, from the log, the parent woke up after 3ms timeout, so it could be too short when the host is overloaded.

Let's extend it to 5s.

---
 tools/testing/selftests/net/af_unix/so_peek_off.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/af_unix/so_peek_off.c +2 -2
index 1a77728128e5..86e7b0fb522d 100644
@@ -36,8 +36,8 @@ FIXTURE_VARIANT_ADD(so_peek_off, seqpacket)
 FIXTURE_SETUP(so_peek_off)
 {
 	struct timeval timeout = {
-		.tv_sec = 0,
-		.tv_usec = 3000,
+		.tv_sec = 5,
+		.tv_usec = 0,
 	};
 	int ret;
 
Signature · 1 line
2.52.0.460.gd25c4c69ec-goog
#3 lore raw
In reply to Kuniyuki Iwashima
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 24 Nov 2025 21:26:38 +0000 you wrote:

Patch 1 add .gitignore under tools/testing/selftests/net/af_unix/.

Patch 2 make so_peek_off.c less flaky.

Changes:
v2: Rebased on clean net-next
v1: https://lore.kernel.org/netdev/[email protected]/

[...]

Here is the summary with links:
- [v2,net-next,1/2] selftest: af_unix: Create its own .gitignore.

    https://git.kernel.org/netdev/net-next/c/adb6b68c5060
  - [v2,net-next,2/2] selftest: af_unix: Extend recv() timeout in so_peek_off.c.
    https://git.kernel.org/netdev/net-next/c/ebe2f0b3cfe3

You are awesome, thank you!

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