Repository navigation
testing/nettest: Test sends of local sockets that wait for space, in many parts and as whole datagrams - #4038
Merged
acassis merged 2 commits intoNov 17, 2026
Conversation
xiaoxiang781216
previously approved these changes
Nov 12, 2026
Contributor
|
@casaroli please fix the conflict |
Add cases to cmocka_net_local_dgram: - poll_full, poll_fullwait: a non-blocking send to a full bound socket fails with EAGAIN and leaves no part of a datagram; a blocking send ends when the receiver reads. - send_intr, pair_intr, stream_send_intr: a signal ends a send() that waits for space in a full bound datagram socket, a full datagram socket pair and a full stream socket, with EINTR. The send waits in a second thread, which gets the signal: in a flat build the handler runs on the stack of that thread, which has no cmocka frames. All the new cases pass on Linux. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
Add cases to cmocka_net_local_dgram: - pair_iov, send_iov: sendmsg() of one datagram in 12 parts, two of them empty, on a datagram socket pair and to a bound socket. - pair_whole: a reader with O_NONBLOCK reads a full datagram socket pair with no pause, while a send waits for space in another thread. The reader must get each datagram whole, never the start of a datagram without the rest. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
casaroli
force-pushed
the
apps-net-local-send-frame-test-up
branch
from
November 14, 2026 11:57
2e321f2 to
9d2dd86
Compare
Contributor
Author
|
Done. |
casaroli
marked this pull request as ready for review
November 16, 2026 15:28
xiaoxiang781216
approved these changes
Nov 16, 2026
cederom
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests for apache/nuttx#21767 (
send_iov) and apache/nuttx#21768 (the other cases): datagrams of local sockets as one frame, a signal during a send. Two commits:cmocka_net_local_dgram:poll_full,poll_fullwait(a non-blocking send to a full bound socket fails withEAGAINand leaves no part of a datagram; a blocking send ends when the receiver reads),send_intr,pair_intr,stream_send_intr(a signal ends asend()that waits for space in a full bound datagram socket, a full datagram socket pair and a full stream socket, withEINTR; the send waits in a second thread, which gets the signal).pair_iov,send_iov(sendmsg()of one datagram in 12 parts, two of them empty, on a datagram socket pair and to a bound socket),pair_whole(a reader withO_NONBLOCKreads a full datagram socket pair with no pause while a send waits for space in another thread: it must get each datagram whole, never the start of a datagram without the rest).Impact
New tests only, in the existing
CONFIG_TESTING_NET_LOCAL_DGRAM. No defconfig enablesTESTING_NET_TEST, so no CI build changes. No documentation change.Testing
qemu-armv8a (arm64, HVF, 1 CPU), make, each case alone (
cmocka_net_local_dgram <dir> <case>). knsh: kernel build; nsh: flat build. Options as in #4003.cmocka_net_local_dgrampair_intr,stream_send_intr,send_iov,pair_wholeFAILcmocka_net_local_dgrampoll_full,poll_fullwaitandsend_intrpass on #21614 too: master sends a datagram to a bound socket as one atomic frame since 6b50d0c8de4.pair_iovpasses on #21614 too.On Linux 7.0 (arm64 container, host libc, the cmocka of apps): the 8 new cases PASS.
tools/checkpatch.sh -c -u -m -gpasses.Not run: CMake builds, sim, other arches.