Add cmocka-based test program for SO_TIMESTAMPING socket option
under testing/nettest/timestamp/. Covers all five test scenarios
from the SO_TIMESTAMPING PR (apache/nuttx#20161):
1. SO_TIMESTAMPING setsockopt/getsockopt
2. SO_TIMESTAMP/SO_TIMESTAMPNS backward compatibility
3. TX timestamping + MSG_ERRQUEUE delivery
4. RX timestamp via SO_TIMESTAMP
5. TX timestamping with poll(POLLPRI) notification
Enable with CONFIG_TESTING_NET_TIMESTAMP=y (requires
CONFIG_NET_TIMESTAMP, CONFIG_NET_PKT, CONFIG_TESTING_CMOCKA).
Tested on sim:dynconns — all 5 tests pass.
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
Add a CMocka regression test for zero-length checksum fragments.
The test verifies that an empty IOB between fragments does not affect
the checksum calculation or pending odd-byte state.
Assisted by: GitHub Copilot
Signed-off-by: Megha Rajput <i.meghar.2408@gmail.com>
Add CMocka regression test case to verify local socket SCM_RIGHTS
behavior when the file descriptor table is exhausted.
Signed-off-by: Bogdan <Bogdan4ik0759@gmail.com>
The TCP nettest server receives up to TEST_BUFFER_SIZE bytes and then appends a NUL terminator before checking for the exit command. A full-size receive can therefore write one byte past the receive buffer.
Reserve one extra byte for the terminator while keeping the recv() limit and echo length capped at TEST_BUFFER_SIZE.
Signed-off-by: Old-Ding <ai.neo.ae86@gmail.com>
Fix spelling errors in QuickJS Kconfig and nettest source:
* "distable" -> "disable" in INTERPRETERS_QUICKJS_NONE description
* "destory" -> "destroy" in INTERPRETERS_QUICKJS_EXT_HOOK option
and help text (2 occurrences)
* "err_destory" -> "err_destroy" label in nettest_tcpserver.c
(3 occurrences: 2 goto targets and 1 label definition)
These are cosmetic fixes with no functional change.
Signed-off-by: hanzj <hanzjian@zepp.com>
Based on the original directory structure, an additional utils directory is added. It store public functions which used by multiple testcases, such as the tcp server-related functions added this time. In addition, two testcases for testing tcp connections have been added.
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
Provides a network automated testing framework, including the main directory structure and Makefile, CMakeLists, Kconfig and other files such as tcp.
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>