Repository navigation
Conversation
…buffer. Add test_can_name_short to cmocka_net_can. getsockname() of a bound CAN_RAW socket writes its address into a buffer of 2 bytes. The call must succeed, the buffer gets the first 2 bytes of the address, the bytes after it do not change, and *addrlen gives the length of the whole address. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
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.
depends-on: apache/nuttx#22470
Summary
New case
test_can_name_shortincmocka_net_can.getsockname()of a boundCAN_RAWsocket writes its address into a buffer of 2 bytes. The call must succeed, the buffer gets the first 2 bytes of the address, the bytes after it do not change, and*addrlengives the length of the whole address, as on Linux.Impact
Test only. The case fails with
EINVALuntil apache/nuttx#22470 merges.Testing
qemu-armv8a:nsh (flat) with CAN and loopback, CI image, QEMU TCG: the case FAILED (
EINVAL) on nuttx master, PASSED with apache/nuttx#22470; the other cases ofcmocka_net_canpass on both. Builds with-Werror: qemu-armv8a:nsh, qemu-armv8a:knsh and rv-virt:knetnsh64 (kernel,make import), rv-virt:netnsh64.