Thread (18 messages) flat view 18 messages, 4 authors, 18d ago

Re: [PATCH net-next 13/14] selftests/bpf: Test skb_ext read from sk_skb stream verdict hook

From: Jack Wang <hidden>
Date: 2026-08-16 14:11:47
Also in: bpf

On Fri Aug 14, 2026 at 4:14 PM CST, Jakub Sitnicki wrote:
+	n = send(p1, test_payload, TEST_PAYLOAD_LEN, 0);
+	if (!ASSERT_EQ(n, TEST_PAYLOAD_LEN, "send"))
+		goto cleanup;
+
+	n = recv(c1, buf, sizeof(buf), 0);
send() and recv() are stream sockets,so either operation may return a short count
even though this will usually not happen on loopback. Maybe use send/receive helpers
or loop til TEST_PAYLOAD_LEN bytes is a better choice,the blocking recv() can leave
the test stuck instead of reporting a timeout when data path regresses.

cheers
Jack Wang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help