Commit graph

5 commits

Author SHA1 Message Date
Old-Ding
662133eeca testing: nettest: Fix TCP server terminator bounds
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>
2026-07-09 09:27:28 +08:00
hanzj
b5b54e7663 interpreters/quickjs,testing/nettest: fix typos in Kconfig and source.
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>
2026-05-28 15:02:31 +08:00
Zhe Weng
2df2534898 testing/nettest: Add test for net bufpool
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-01-14 14:39:44 +08:00
zhangshuai39
a6b9e71846 testing/nettest: Add utils directory and two tcp testcases to the testing framework
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>
2025-01-12 01:24:12 +08:00
zhangshuai39
f2b0437688 apps/testing: Add a cmocka framework for network testing
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>
2025-01-09 22:40:36 +08:00