Commit graph

684 commits

Author SHA1 Message Date
hujun5
24e1c4df6f testing/ostest/smp_call.c: fix smp_call cpu_set inconsistency issue
If we set CONFIG_SMP_DEFAULT_CPUSET=1
This will cause the value of cpuset to be 0x1,
((1 << CONFIG_SMP_NCPUS) - 1) will result in the cpuset being 0x11,
leading to test case errors.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-12-09 09:44:37 -05:00
raiden00pl
641f7ced84 testing/ltp: add ltp zip file to gitignore
add ltp zip file to gitignore

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-12-05 17:53:57 +01:00
raiden00pl
5549f66dc1 testing/memtester: fix build error for cmake
fix broken CMakeLists.txt for memtester

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-12-05 17:53:57 +01:00
raiden00pl
39cb6fefda testing/memtester: add memtester.zip to gitignore
add memtester.zip to gitignore

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-12-05 17:53:57 +01:00
raiden00pl
8c5c506e40 testing/cachetest: fix compilation error for arm64
fix compilation error:

cachetest_main.c:37:26: error: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
   37 | #define CACHETEST_PREFIX "CACHE Test: "
      |                          ^~~~~~~~~~~~~~
cachetest_main.c:150:20: note: in expansion of macro 'CACHETEST_PREFIX'
  150 |   syslog(LOG_INFO, CACHETEST_PREFIX "waddr:%p, uncacheble addr start:%p,"
      |                    ^~~~~~~~~~~~~~~~
cachetest_main.c:151:17: note: format string is defined here
  151 |          "size:%u\n", info->waddr,
      |                ~^
      |                 |
      |                 unsigned int
      |                %lu

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-12-05 17:53:57 +01:00
buxiasen
0f8bca6d8f testing/pm_smp: add more delay, avoid idle canot run one cycle
If the host performance low, possible not able to enter idle thread,
cause case break.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-12-01 19:10:11 +08:00
buxiasen
4ac0b10318 drivertest_uart: uart device open should use cfmakeraw to ensure raw.
reference: https://www.man7.org/linux/man-pages/man3/termios.3.html

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-12-01 19:09:41 +08:00
buxiasen
3bd8506ae8 testing/ostest/roundrobin: add compatible for SMP
Fix if SMP cause calculation run in multi-core cause case break.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-12-01 19:09:27 +08:00
buxiasen
b95c9980b5 apps/ostest/roundrobin: add fail detect and print
Before patch we never detect the roundrobin fail.
After patch use a array to detect if the calculation swapped when
processing.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-12-01 19:09:27 +08:00
buxiasen
d23eb01490 fs_stat_test: fix fs date case not strict enough
use utc diff should prefer and more strict.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-12-01 19:07:22 +08:00
caofuqi1
1c769d1410 testing/ltp: add cmake support
add cmake support for LTP

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Co-Authored: xuxin19 <xuxin19@xiaomi.com>
2025-11-19 01:38:36 +08:00
p-szafonimateusz
188d533dd2 testing/cmoka: fix cmake build
fix cmake build for cmoka:

   [2/9] No update step for 'cmocka_fetch-populate'
   [3/9] Performing patch step for 'cmocka_fetch-populate'
   can't find file to patch at input line 16
   Perhaps you used the wrong -p or --strip option?

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-11-18 21:59:42 +08:00
wangchengdong
bd10572851 testing/ostest: align wdog ostest with wdog bugfix
https://github.com/apache/nuttx/pull/17293 fixed
    wd_start bug, and this patch fixed the related ostest
    accordingly

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-11-10 10:44:53 +08:00
raiden00pl
91a7580303 testing/mm/cachetest/cachetest_main.c: fix codespell error
fix codespell error for cachetest_main.c

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-11-02 22:33:46 +08:00
raiden00pl
4f5fe44af1 testing/testsuites/kernel/socket/cases: fix compilation error
fix compilation error:

kernel/socket/cases/net_socket_test_010.c: In function ‘ioctltestinternal’:
kernel/socket/cases/net_socket_test_010.c:188:20: error: ‘siocgifname’ undeclared (first use in this function)
  188 |   ret = ioctl(sfd, siocgifname, &ifr);

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-11-02 22:33:46 +08:00
raiden00pl
0a906edd81 testing/mm/cachetest/cachetest_main.c: fix compilation error
fix compilation error:

cachetest_main.c: In function ‘cachetest_main’:
cachetest_main.c:240:7: error: implicit declaration of function ‘up_flush_dcache’ [-Wimplicit-function-declaration]
  240 |       up_flush_dcache((uintptr_t)info.waddr, (uintptr_t)info.waddr +

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-11-02 22:33:46 +08:00
raiden00pl
1f1240a0f4 testing/drivers/fftest/fftest.c: fix compilation error
fix compilation error:

CC:  vfs/fs_rmdir.c fftest.c: In function ‘fftest_main’:
fftest.c:104:7: error: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration]
  104 |   if (ioctl(fd, EVIOCGBIT, fffeatures) < 0)

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-11-02 22:33:46 +08:00
trns1997
a44d65c939 testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects.
Remove the previous guard logic and use a proper CMake
`exclude` rule to prevent `cxx-oot-build` from being
included when building projects with CMake.

* Ensures OOT test project is not pulled into normal apps.
* Keeps CI and export tests isolated from regular builds.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-10-15 14:34:32 +08:00
trns1997
3684699190 testing/cxx-oot-build: Add out-of-tree build test.
Add the source content for the out-of-tree build test
under `apps/testing/cxx-oot-build`. This supports the
new CI check in NuttX to prevent regressions in the
`make export` workflow.

The test project provides:
* Sample OOT build structure.
* Integration with exported `nuttx-export`.
* Verification of successful build and link.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-25 18:32:38 +08:00
wangchengdong
1b9d420e79 sched/event: add nxevent_getmask tests
add test cases for the new nxevent_getmask() function

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-10 13:59:04 +08:00
wangchengdong
7c5800924a testing/ostest: add nxevent_clear() test cases
Add test cases to verify the new recently added nxevent_clear() api

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 15:36:01 +08:00
Matteo Golin
d334c5eb67 apps/unity: Add printf configuration
Allows the user to select whether or not they want access to the Unity
``TEST_PRINTF`` commands.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-08-07 11:21:57 +08:00
wangmingrong1
3f823f9f25 kasantest: -fno-builtin is enabled by default
The strlen function called by kasantest will be optimized by the compiler, and the strlen function implemented in NX will not be called. Adding -fno-builtin can solve the problem.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-18 22:42:25 +08:00
dongjiuzhu1
4f5c283438 testing/fs: update api name fs_getfilep/fs_putfilep to file_get/file_put
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:32 +08:00
ouyangxiangzhen
a03ed46947 ostest/wdog: Remove periodical wdog test cases.
The peridiodical wdog test cases should be removed after removing of the periodical wdog APIs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-06-05 19:42:52 +08:00
raiden00pl
44eeb1c7c8 testing: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
Richard Tucker
18b72e89a4 apps/testing: fix typo 2025-05-26 18:56:32 +02:00
ouyangxiangzhen
a570953257 ostest/wdog: update wdog_test.
This commit updated the wdog_test to adapt to the semantic changes of
the wd_start.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-22 13:27:16 +08:00
ouyangxiangzhen
afade4f5c9 testing/ostest: add periodic wdog testing.
This commit added periodic wdog testing.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-22 13:27:16 +08:00
Jukka Laitinen
376cc5a731 testing/ostest: Add checking of signal delivery TID to signest test
- Add another signal action, "interfere_action", and signal the interfere thread
- In both signal action functions (waiter and interfere), check that they get executed
  in correct thread's context

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-08 23:21:13 +08:00
Jukka Laitinen
a011cad584 testing/ostest/signest: Replace kill with pthread_kill to fix running in SMP
"kill" sends the signal to all the the threads in the group. The intention of
the test is to send signals only to the "waiter" thread.

Running signal actions in parallel is not compatible behaviour with
the signest test, which assumes that signals are being run one after another.
For example running signals 38 and 40 in parallel on two threads/two cpus
would cause the test incorrectly fail on "even signals nested".

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-03 11:09:07 +08:00
raiden00pl
3764ab041a cmake: remove empty strings from FetchContent
remove empty strings from FetchContent to eliminate cmake build warnings like this:

CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1564 (cmake_parse_arguments):
  The BUILD_COMMAND keyword was followed by an empty string or no value at
  all.  Policy CMP0174 is not set, so cmake_parse_arguments() will unset the
  ARG_BUILD_COMMAND variable rather than setting it to an empty string.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 14:20:21 +08:00
zhangshoukui
369729eea4 testing/drivers/drivertest: Uniform test case name
1.Some test functions are named too simply
2.Many driver tests depend on specific configurations and hardware, and the unified specification name facilitates cmocka to skip tests by using the skip parameter for wildcard matching

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-03-27 09:00:15 +01:00
zhangshoukui
7b65b2bb41 drivertest_uart: Pass in the specified parameters to test
https://github.com/apache/nuttx/blob/master/tools/ci/testrun/script/test_framework/test_cmocka.py
cmocka --skip test_case_posix_timer|test_case_oneshot|write_default|read_default|burst_test|gpiotest01

In the CI of the community, this test is skipped because this test will block the terminal, and I think that the test added to cmocka should not be designed this way

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-03-26 15:23:40 +08:00
Alan Carvalho de Assis
cdc5968c67 testing: Add Serial Error Reporting testing app
This commit adds support to Serial Error Reporting using the ioctl
TIOCGICOUNT.

This examples was inspired on this sample code:
https://stackoverflow.com/questions/78796301/c-serial-communication-why-does-read-lose-some-data-bytes-at-high-baud-rates/78800245#78800245

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-03-24 21:52:26 +08:00
Huang Qi
16a16a9543 ostest: Implement mutex move test functionality
Add a new test for moving mutexes to verify behavior when a mutex is relocated.
* Introduced mutex_thread_args_t structure for thread arguments
* Created moved_mutex_thread_func to handle mutex operations in threads
* Updated mutex_test to include mutex_move_test for comprehensive testing

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-03-24 20:34:54 +08:00
chenrun1
9c829f6650 examples: Add depends to different test cases
Summary:
  1.ftpd
  2.unionfs
  3.userfs
  4.nxffs
  5.smart

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-06 09:34:24 +01:00
chenrun1
a0f05d0c62 ostest:Fix the issue that nxevent pthread was not executed, causing case failed
Summary:
  In the case of slow overall system response (such as when MM_KASAN is turned on), the nxevent case work thread will not be executed and will be switched back to the main thread, so that the event does not get the expected result and the case fails.
By adjusting the thread priority, the work thread can be scheduled to avoid the expected result failure

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-05 10:08:17 +01:00
tengshuangshuang
844b9c657d apps/testing:fix uclibc atomic make.defs error
In the previous changes to the apps/testing folder, I added an extra slash in the make.defs of uclibcxx, atomic.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-03-03 16:03:13 +01:00
simbit18
a0dfd187d8 [Kconfig style] Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-25 09:27:14 +01:00
simbit18
4315a1c8cc [nxstyle] fix Relative file path
fix Relative file path does not match actual file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 16:29:13 -05:00
Tiago Medicci
f139e56cd6 testing/libc/wcstombs: Add testing application for wcstombs
This application test the libc's `wcstombs` function for different
len sizes (bigger than the converted string, exactly the size of
it and smaller than it).
2025-02-06 23:41:31 +01:00
Neo Xu
e1e28eb88a ostest: fix cmake build break
/nuttx/apps/testing/ostest/ostest_main.c:322:(.text.user_main+0x3c3): undefined reference to `sched_thread_local_test'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2025-01-30 17:15:49 +01:00
Xiang Xiao
cf46792554 apps/testing: Move sd_bench to apps/bechmarks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 04:53:57 +01:00
Xiang Xiao
85a6aaa322 apps/testing: Move irtest/sensortest/resmonitor/monkey to apps/system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 02:25:08 +01:00
Xiang Xiao
4e9d907677 testing: Move rpmsgdev to drivers/rpmsgdev
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 09:53:02 -03:00
Xiang Xiao
d7be1bd672 testing: Move fs/fopencookie to libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 09:53:02 -03:00
Xiang Xiao
b7f05e89ba testing: Move crypto/setest to drivers and open_memstream to libc
follow the dissusion from:
https://github.com/apache/nuttx-apps/pull/2931

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 07:32:53 +01:00
tengshuangshuang
0406e6734a apps/testing:move atomic,cpuload,getprime,smp and timerjitter folders to the new sched folder
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-26 00:23:15 +08:00
tengshuangshuang
077c3461db apps/testing:merge case folder to the new mm folder
1.rename original  mm folder to heaptest and move it to mm folder

2.move the following folders into the new mm folder:
  cachetest, heaptest, iob, kasantest, memstress, memtester, ramtest, stressapptest

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-23 18:19:06 +08:00