huojianchaoyy opened a new pull request, #4123: URL: https://github.com/apache/nuttx-apps/pull/4123
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Memory test fixes from Xiaomi Vela. - **kasantest: Add test cases for stack**: with `CONFIG_MM_KASAN_SIM` (the host AddressSanitizer) the global tests run too, and two tests write just before and just after a stack array. - **testsuites/kernel/mm: replace task_create() with pthread_create()**: `test_nuttx_mm08()` uses threads, as `task_create()` is not available in a kernel build. - **[app/testig/kernel]: fix memory bound check in test_nuttx_mm07()**: the allocation keeps 128 bytes back from the largest free chunk instead of 16, which the chunk header can take more than. - **testing/mm/iob: fix compile warning**: `iob_main.c` includes `<nuttx/mm/iob.h>` and `<pthread.h>`; `<iob.h>` was only found by the Makefile (`-I$(TOPDIR)/mm/iob`), so the CMake build failed (see Testing). - **testing/mm/memstress: zero-init thread context**: GCC 15 reports it with `-Werror=maybe-uninitialized`. One commit first and three after the patch that needs them: - **testing: fix the nxstyle and codespell errors in the mm tests**: existing errors in `iob_main.c`, `kasantest.c`, `memorystress_main.c` and `mm_test_007.c`, which this PR touches. No functional change. - **testing/mm/kasantest: add the blank lines in the stack tests**, **testing/testsuites: declare the mm_test_008 threads one per line**, **testing/testsuites: add the blank line after max_size in mm_test_007**: nxstyle, after the patch that brought each of them. ## Impact - Tests only. `kasantest` has two more cases with `CONFIG_MM_KASAN_SIM`, and runs the global cases with it too. ## Testing Host: Ubuntu 22.04 x86_64, GCC 13.4.0, CMake 3.23 + Ninja 1.10. nuttx master c8907860837, apps base 8ff87439bf4. `./tools/checkpatch.sh -c -u -m -g HEAD~9..HEAD` (nuttx master's) passes. CMake builds: - `sim:citest` with `MM_KASAN_SIM`, `TESTING_KASAN`, `MM_IOB`, `TESTING_IOB` and `TESTING_MEMORY_STRESS` (the testsuites with `CM_MM_TEST` included); - `sim:nsh` with `MM_IOB`, `TESTING_IOB` and `TESTING_MEMORY_STRESS`. Both fail on the apps base with `testing/mm/iob/iob_main.c:36:10: fatal error: iob.h: No such file or directory` and build with this PR. Make: `sim:citest` with `MM_IOB`, `TESTING_IOB` and `TESTING_MEMORY_STRESS` builds with no warning. On the `sim:citest` build above (host AddressSanitizer), `cmocka_mm_test` passes: ``` [ OK ] test_nuttx_mm07 [ OK ] test_nuttx_mm08 [ OK ] test_nuttx_mm09 [ PASSED ] 9 test(s). ``` and `iob` runs to its last statistics line ("throttled thread 1 statistic failed_count 9437 success_count 563"). Not tested: kasantest at run time, a kernel build, GCC 15. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
