casaroli opened a new pull request, #4147: URL: https://github.com/apache/nuttx-apps/pull/4147
depends-on: apache/nuttx#22357 ## Summary Add `test_tcp_process_data` to `cmocka_net_tcp`. The case sends 1 MiB over TCP on 127.0.0.1 to a forked child, with `write()` and `writev()` in turn. The child reads the data with `read()` and `readv()` in turn and checks every byte. In a kernel build, the network can complete the `read()` of the child in another task, where the memory of the child is not mapped. apache/nuttx#22357 copies the socket data through kernel memory; this case checks it. A step that does not complete ends the case, not the test program: both sockets have a time limit of 30 s, an alarm ends the `accept()` if the child cannot connect, and the parent stops the child when it cannot send. ## Impact Test only. The case needs `fork()`, so Make and CMake build the new file only with `CONFIG_ARCH_HAVE_FORK` (kernel builds), as the `fork()` cases of `cmocka_net_local`. ## Testing Master d729a200002, 3 boots on each side, 1 CPU: | Configuration | NuttX master | with apache/nuttx#22357 | |---|---|---| | `qemu-armv8a:knsh` (kernel, arm64, QEMU TCG) | FAIL 3/3: the child gets wrong bytes | PASS 3/3 | | `qemu-intel64:knsh_romfs` (kernel, x86_64, QEMU KVM) | FAIL 3/3: the child gets wrong bytes | PASS 3/3 | A flat `qemu-armv8a:nsh` with the network tests builds without the case and gives the same results as before. `tools/checkpatch.sh -c -u -m -g` passes. -- 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]
