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

Jack Wang <[email protected]>
Newsgroups org.kernel.vger.bpf,org.kernel.vger.netdev
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.