Skip to content

testing/nettest: Test the name of a socket pair. - #4175

Draft
casaroli wants to merge 1 commit into
apache:masterfrom
casaroli:local-pair-name-counter-up
Draft

casaroli wants to merge 1 commit into
apache:masterfrom
casaroli:local-pair-name-counter-up

Conversation

@casaroli

Copy link
Copy Markdown
Contributor

depends-on: apache/nuttx#22469

Summary

Two new cases in cmocka_net_local_dgram. test_local_dgram_pair_path: F_GETPATH of the ends of a socket pair must give local:[socketpairN], with N a decimal number from a counter: the same N for both ends of a pair, and a different N for the next pair. test_local_dgram_pair_noname: connect() and sendto() of a datagram socket to that name must fail with ENOENT, bind() of the name must succeed, and the pair must still work. Without CONFIG_FS_IOCTL_FILEPATH the cases are skipped.

Impact

Test only. The cases fail until apache/nuttx#22469 merges.

Testing

qemu-armv8a:nsh (flat), CI image, QEMU TCG: both cases FAILED on nuttx master, PASSED with apache/nuttx#22469; the other cases of cmocka_net_local_dgram pass on both. Builds with -Werror: qemu-armv8a:nsh, qemu-armv8a:knsh and rv-virt:knetnsh64 (kernel, make import), rv-virt:netnsh64.

Add two cases to cmocka_net_local_dgram.  test_local_dgram_pair_path:
F_GETPATH of the ends of a socket pair must give "local:[socketpairN]",
with N a decimal number from a counter: the same N for both ends of a
pair, and a different N for the next pair.  test_local_dgram_pair_noname:
connect() and sendto() of a datagram socket to that name must fail with
ENOENT, bind() of the name must succeed, and the pair must still work.
The cases need CONFIG_FS_IOCTL_FILEPATH; without it they are skipped.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant