selftests/bpf: Fix sockmap_multi_channels reliability#11371
selftests/bpf: Fix sockmap_multi_channels reliability#11371kernel-patches-daemon-bpf[bot] wants to merge 1 commit intobpf_basefrom
Conversation
|
Upstream branch: e06e6b8 |
60571dc to
4f46538
Compare
|
Upstream branch: e06e6b8 |
f3a316b to
389f5db
Compare
4f46538 to
d37e05f
Compare
|
Upstream branch: e06e6b8 |
389f5db to
43f6744
Compare
d37e05f to
274c29e
Compare
|
Upstream branch: e06e6b8 |
43f6744 to
16153bf
Compare
274c29e to
72504f5
Compare
|
Upstream branch: e06e6b8 |
16153bf to
7dda8cb
Compare
72504f5 to
56dc67d
Compare
|
Upstream branch: e06e6b8 |
7dda8cb to
bf53f42
Compare
56dc67d to
f19b2ac
Compare
|
Upstream branch: e06e6b8 |
bf53f42 to
540aa92
Compare
f19b2ac to
2a02ef5
Compare
|
Upstream branch: 146bd2a |
540aa92 to
e2120f6
Compare
2a02ef5 to
20c6fff
Compare
|
Upstream branch: a1e5c46 |
e2120f6 to
709e668
Compare
20c6fff to
f8a3765
Compare
|
Upstream branch: 4a04d13 |
709e668 to
7b7d309
Compare
f8a3765 to
b0e2892
Compare
|
Upstream branch: ec69c9e |
7b7d309 to
03fb7da
Compare
b0e2892 to
e43fe4c
Compare
Previously I added a FIONREAD test for sockmap, but it can occasionally fail in CI [1]. The test sends 10 bytes in two segments (2 + 8). For UDP, FIONREAD only reports the length of the first datagram, not the total queued data. The original code used recv_timeout() expecting all 10 bytes, but under high system load, the second datagram may not yet be processed by the protocol stack, so recv would only return the first 2-byte datagram, causing a size mismatch failure. Fix this by receiving exactly the expected bytes (matching FIONREAD) in the first recv. The remaining datagram is then consumed in a second recv block, which is only reachable for UDP since TCP's expected already equals sizeof(buf). Test: ./test_progs -a sockmap_basic 410/1 sockmap_basic/sockmap create_update_free:OK ... Summary: 1/35 PASSED, 0 SKIPPED, 0 FAILED [1] https://github.com/kernel-patches/bpf/actions/runs/22919385910/job/66515395423 Cc: Jiayuan Chen <jiayuan.chen@linux.dev> Fixes: 17e2ce0 ("selftests/bpf: Add tests for FIONREAD and copied_seq") Signed-off-by: Jiayuan Chen <jiayuan.chen@shopee.com>
|
Upstream branch: c369299 |
03fb7da to
f38e841
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1065440 irrelevant now. Closing PR. |
Pull request for series with
subject: selftests/bpf: Fix sockmap_multi_channels reliability
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1065440