CV-Bowen opened a new pull request, #21074:
URL: https://github.com/apache/nuttx/pull/21074
## Summary
`rpmsg_ping_once()` takes its fill byte as plain `char`, whose signedness
is implementation-defined, and passes it to `memset()`. `memset()`
converts the value to `unsigned char`, so the bytes written are the same
either way; take the parameter as `unsigned char` so the type says what
actually happens. No functional change.
## Impact
`rpmsg_ping` only. No API or Kconfig change.
## Testing
Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
`rpmsg ping all 200 64 3 0` runs 200 iterations, so the fill byte (the
loop index) goes past 127 and through the range where a plain `char`
would be negative; `cmd = 3` is `RPMSG_PING_ACK_MASK |
RPMSG_PING_CHECK_MASK`, which makes the peer compare every data byte
against `data[0]` and log `receive data error` on a mismatch. It passes
on both nodes of sim and qemu-armv8a.
Baseline (`test.sh`, cases: baseline.yaml + extra):
- host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
- tested: nuttx 3f0d1584d4a apps ea8addeaf
- qemu-armv8a built with test-only overlay: disabled LIBC_ENVPATH
BINFMT_CHECKEXEC
- sim:rpserver + sim:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
- [x] `rpmsg dump all` (proxy)
- [x] `rpmsg ping all 200 64 3 0` (server)
- [x] `rpmsg ping all 200 64 3 0` (proxy)
- qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
- [x] `uname -a` (server)
- [x] `uname -a` (proxy)
- [x] `rpmsg dump all` (server)
- [x] `rpmsg ping all 10 1024 3 0` (server)
- [x] `rpmsg ping all 10 1024 3 0` (proxy)
- [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
- [x] `cat /sp/version` (proxy)
- [x] `rpmsg ping all 200 64 3 0` (server)
- [x] `rpmsg ping all 200 64 3 0` (proxy)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]