nuttx-apps/testing
zhangyuan29 413d2ddbc3 testing/libc/arch_libc: Cover unaligned src/dst copy paths.
test_strcpy(), test_strncpy() and test_stpcpy() applied the same offset
to the source and to the destination, so both pointers always shared the
same word congruence.  Architecture optimized copy routines take a
different code path when the two offsets differ: a byte prologue to
align the destination, then either a byte fallback or a shift-merge loop
that recombines two source words per store.  None of that was reached by
the test.

Vary the source and destination offsets independently over 0..7 in those
three tests, so both the equal congruence (aligned word copy) and the
unequal congruence (shift-merge) paths are covered, and report both
offsets on failure so a regression points at the offending combination.

Also drop the ARCH_TOOLCHAIN_GNU dependency from TESTING_ARCH_LIBC.  The
test only uses standard C string functions and perf_gettime(), with no
GNU specific construct, so it builds with non GNU toolchains such as
TASKING as well.

Impact: test only, selected by CONFIG_TESTING_ARCH_LIBC (default n).
Dropping the ARCH_TOOLCHAIN_GNU dependency only widens the set of
toolchains that may select the test, no existing 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.  strcpy, strncpy and
stpcpy report PASSED for all 64 offset combinations, and
"arch_libc_test Passed".

Assisted-by: Claude:claude-opus-5
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-08-10 16:55:36 -03:00
..
arch apps/testing: move himem_test,mtetest and x86-64-ABI folders to the new arhc folder 2025-01-20 17:48:48 +08:00
cmocka cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
crypto !fsutils/passwd: Replace TEA with PBKDF2-HMAC-SHA256 2026-07-22 17:21:22 +08:00
cxx apps: Fix minor issues for latest toolchains 2026-01-23 10:00:52 +08:00
cxx-oot-build testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects. 2025-10-15 14:34:32 +08:00
drivers cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
enet apps/testing: add cmock_test for enet in order to test send and receive pkt 2025-12-29 22:30:56 +08:00
fff cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
fs examples/fdpicxip, testing/fs/xipfs: A DT_NEEDED library is one instance. 2026-08-07 11:24:32 +08:00
libc testing/libc/arch_libc: Cover unaligned src/dst copy paths. 2026-08-10 16:55:36 -03:00
ltp cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
mm cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
nettest testing: nettest: Fix TCP server terminator bounds 2026-07-09 09:27:28 +08:00
nuts testing/nuts: NuttX Unit Test Selection (NUTS) application. 2025-12-28 10:28:14 +08:00
ostest testing/ostest: set STACKSIZE for the standalone ELF build 2026-08-06 01:39:13 +08:00
sched testing/sched: fix off-by-one sample count in timerjitter 2026-07-11 12:31:24 -03:00
sig_sp_test testing/sig_sp_test: add test for SP context restore on signal return 2026-06-22 10:21:40 -03:00
testsuites apps: Fix O_ACCMODE bitmask checks after Linux flag alignment 2026-06-30 12:19:58 -04:00
unity cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
.gitignore Ensure all source code end with one and only one newline 2020-02-09 08:14:49 -06:00
CMakeLists.txt testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects. 2025-10-15 14:34:32 +08:00
Make.defs testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile testing: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00