mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-10 23:15:18 +00:00
The arch_libc test only covered strcpy, so the architecture optimized implementations of the remaining string and memory routines were never exercised by the test suite. Extend the test to also cover memcpy, memmove, memset, memcmp, memchr, strlen, strcmp, strchr, strncmp, strnlen, strncpy, stpcpy, strcat and strrchr: * Every function gets a correctness test that sweeps the buffer alignment and the transfer size and compares the result against the expected value. * Every function gets a speed test that reports the average cycle count measured with perf_gettime(). * Every individual test is selected by its own CONFIG_TESTING_ARCH_LIBC_<FUNC> option (default y), so a target can drop the ones it does not need. Impact: test only. Nothing is built unless CONFIG_TESTING_ARCH_LIBC (default n) is selected, so no existing board configuration changes. Testing: built and ran sim:nsh on Linux x86_64 (Ubuntu 24.04, gcc 13.3.0) with CONFIG_TESTING_ARCH_LIBC=y. All 15 enabled functions report PASSED and "arch_libc_test Passed". Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> |
||
|---|---|---|
| .. | ||
| arch | ||
| cmocka | ||
| crypto | ||
| cxx | ||
| cxx-oot-build | ||
| drivers | ||
| enet | ||
| fff | ||
| fs | ||
| libc | ||
| ltp | ||
| mm | ||
| nettest | ||
| nuts | ||
| ostest | ||
| sched | ||
| sig_sp_test | ||
| testsuites | ||
| unity | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Make.defs | ||
| Makefile | ||