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>