Commit Graph

438 Commits

Author SHA1 Message Date
Xiang Xiao
e55c0d9aa5 Remove @ tag from all comments
and format the multiple line comments

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-01-04 10:26:49 +01:00
renjianguang
d9b8a0ee62 drivertest: Fix drivertest_audio crash
1.call AUDIOIOC_RELEASE when finished
2.make sure the driver dequeue all buffers before free the buffers

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2023-12-28 05:38:58 -08:00
fangxinyong
ba075747be ostest: Add initial support for CONFIG_BUILD_KERNEL
task_* APIs are unavailable in kernel build mode, replacing with
posix_spawn or pthread_* API to pass the case. But posix_spawn requires
some dependency, for example CONFIG_BUILTIN and CONFIG_LIBC_EXECFUNCS,
so pthread_* APIs are used in most scenarios. Some tests should be
re-visited because the intent is to user another task (in this case
another process) to e.g. receive signals.
That will require quite a bit of extra work.

Tests that had to be disabled:
- restart: task_restart() does not work at all with kernel mode so it is
  disabled entirely
- fpu: make sure the FPU test is not even attempted, because it will cause
  ASSERT() and stop the test
- vfork: vfork() does not work for some reason in CONFIG_BUILD_KERNEL,
  there is something missing on the kernel side, so just disable the test for now

Tests that should be re-visited:
- The signal tests, now they signal the process itself while before the
  signal was sent to another task. This will require building the part
  that receives the signal as a separate process
- waitpid: Like stated above, waitpid does not work for pthreads
- suspend: kill to send signal does not work for pthreads

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Co-authored-by: Ville Juven <ville.juven@unikie.com>
2023-12-27 10:01:05 -08:00
Xiang Xiao
083eb5e993 Fix the wrong comment banner
"Private Type"->"Private Types"
"Public Data Type"->"Public Types"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-03 14:27:14 -03:00
Michal Lenc
aa49523bb3 testing: add open_memstream test tool
Test tool application for open_memstream for CI testing. Performs basic
write/seek operations.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-11-29 02:12:58 -08:00
Masayuki Ishikawa
79c7962af6 apps: Replace CONFIG_ARCH_HAVE_VFORK with CONFIG_ARCH_HAVE_FORK
Summary:

- Resolves an issue where `vfork_test` was not executed following
  the renaming from CONFIG_ARCH_HAVE_VFORK to CONFIG_ARCH_HAVE_FORK,
  as detailed in https://github.com/apache/nuttx/pull/9755.

Impact:
- Please merge https://github.com/apache/nuttx/pull/11200 before
  merging this PR.

Testing:
- Successfully tested with rv-virt:smp64, spresense:smp, and sim:smp.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-11-16 07:58:57 -08:00
zhangchao53
ac64c7d144 add short command-line arguments and record execution time 2023-11-11 11:23:04 +08:00
Huang Qi
07bbbd541c testing: Fix cmocka_driver_block give more than once
Fix:
```
/home/huang/Work/vela/sifli/apps/Application.mk:273: target 'drivertest_block.c.home.huang.Work.vela.sifli.apps.testing.drivertest.o' given more than once in the same rule
/home/huang/Work/vela/sifli/apps/Application.mk:297: target '/home/huang/Work/vela/sifli/apps/builtin/registry/cmocka_driver_block.bdat' given more than once in the same rule
CC:  romfs_main.c /home/huang/Work/vela/sifli/apps/Application.mk:273: target 'drivertest_block.c.home.huang.Work.vela.sifli.apps.testing.drivertest.o' given more than once in the same rule
/home/huang/Work/vela/sifli/apps/Application.mk:297: target '/home/huang/Work/vela/sifli/apps/builtin/registry/cmocka_driver_block.bdat' given more than once in the same rule
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-09 23:53:30 +08:00
pengyiqiang
8cc06ac5cf testing/monkey: refact monkey test
1. Simplify kconfig configuration items.
2. Use events to control the status of virtual devices and improve testing efficiency.
3. Add adaptive screen resolution support.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-11-07 18:26:04 +08:00
Bowen Wang
d6522be9b5 testing/epoll: add epoll test case
This commid add an epoll testcase to test the epoll
Test case 1: epoll_wait timeout test.
Test case 2: epoll_wait with driver call poll_notify()
             many times simultaneously.
Test case 3: epoll_wait with some driver/socket need call
             poll_setup() again when it's internal state
             changed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-02 14:49:54 +08:00
Stuart Ianna
8f56bc1de2 testing/sd_bench: Port sdbench testing utility for PX4-Autopilot.
Add port of the sdbench utility from PX4-Autopilot: https://github.com/PX4/PX4-Autopilot

This tool is useful for evaluating and testing peformance of SD cards,
block devices or mount points.
2023-10-30 16:58:10 +08:00
raiden00pl
14f19f0e7d remove testing/xxx/README.md. Migrated to Documentation/applications/testing 2023-10-30 10:00:01 +08:00
chenrun1
09bb3b5853 apps:move test tools to testing.
1.memstress
2.ramtest
3.ramspeed
4.cachespeed

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-26 13:17:28 +02:00
Stuart Ianna
4576b3923c testing/sd_stress: Port sdstress testing utility from PX4-Autopilot.
Add port of the sdstress utility from PX4-Autopilot:  https://github.com/PX4/PX4-Autopilot

This tool is useful for verifying correct operation of SD, EMMC, or other mountpoints.
2023-10-25 15:41:27 +08:00
Michal Lenc
d3508b6acd testing: add fmemopen function test tool
Test tool application for fmemopen for CI testing. Performs basic
read/write/seek/append operations.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-25 00:27:14 +08:00
chenrun1
daae92ea92 memtester:Modify the misnaming in Kconfig
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-23 19:25:29 -03:00
Xiang Xiao
f2fcbe7ccf testing: Swith up_perf_xxx to perf_xxx
follow up the the kernel change:
https://github.com/apache/nuttx/pull/10834

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2023-10-23 11:52:07 -03:00
Michal Lenc
a4ceb82d67 testing/fstest: add number of correct/incorrect tests
Verbose output for CI testing with OK and FAILED number of tests.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-18 16:52:24 -04:00
Michal Lenc
cd1d855a71 testing/scanftest: add number of correct/incorrect tests
Verbose output for CI testing with OK and FAILED number of tests. File
name is also now configurable with TESTING_SCANFTEST_FNAME.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-18 16:52:24 -04:00
zhangyuan21
ef86a99093 ostest: Add smp function call test case
This is test case for PR#10934.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-10-18 22:20:48 +08:00
chao an
929f1009c7 system/readline: correct the readline(3) prototype
Reference:
https://man.openbsd.org/readline.3

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-16 22:04:18 +08:00
Michal Lenc
91a682f11b testing: add test application for fopencookie utility
Adds test application for fopencookie utility. The test tool performs
write/read/seek operations on custom stream defined at user space.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-10 01:03:42 +08:00
Xiang Xiao
2d6d199c49 Fix drivertest_watchdog.c:284:33: error: storage size of 'reset_cause' isn't known
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-26 00:45:16 +03:00
Xiang Xiao
610ba20527 Fix ./drivertest_rtc.c:43:10: fatal error: nuttx/time.h: No such file or director
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 23:03:00 +08:00
Xiang Xiao
99a8c5937c Fix drivertest_watchdog.c:207:30: error: 'struct wdg_state_s' has no member named 'infopath'
Remove the unsupported -p option

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-25 01:08:49 +03:00
yinshengkai
3e870833ab testing: fix osperf running error in SMP mode
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-23 15:10:23 +08:00
yinshengkai
9d8a364e16 testing/osperf: fix qemu-armv8a compilation error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-23 15:10:23 +08:00
dulibo1
dd9290b6bd pm:add pm runtime testcase
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-09-22 09:16:24 +08:00
zhangchao53
60778f6f8c support xml report and generate tool
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2023-09-21 12:14:12 +08:00
guoshichao
68b3030f23 testing/ltp: add config.h file
this config.h using to control the test procedure of the relative
test cases. this config.h file is generated by ltp project internal
build file, as we are nuttx build system, so need to manage this file
by manual

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-19 11:13:44 +08:00
TaiJuWu
9f2f86441d Fix sigprocmask
1. SIGSTOP and SIGKILL should not be used as test. In g_some_signals,
SIGKILL is used.

2. The SIGSTOP and SIGKILL flags of current task are set so we need to
delete them.
2023-09-16 00:08:34 +03:00
Xuxingliang
facc9ddc63 testing/mm: use unified name for macros
All macros in mm.h start with MM_

Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-09-12 22:09:43 +08:00
zhangchao53
791d1fc08d add superpi fold and nist-sts fold to gitignore 2023-09-12 10:08:35 +08:00
xuxin19
0ddcedcf6e ignore specific waring on MacOS for CI break
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 20:40:22 +08:00
xuxin19
258d637df3 Makefile:resolve Mac make error block
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 20:40:22 +08:00
zhangchao53
28d4c58448 run testsuites where name match pattern value of --suite 2023-09-08 16:01:06 +03:00
guoshichao
b7e08d4fba ltp/makefile: rm the ltp.zip file after unzipped
the ltp.zip file is not tracked in git record, so after download and
unzip finished, we do not need to keep this ltp.zip file.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-08 17:24:34 +08:00
xucheng5
723b91851f app/ltp : enable can_filter/can_rcv_own_msgs
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-09-07 11:24:47 +03:00
chenrun1
2639f044cc drivertest_block:Fix insufficient number of erasures for mtd devices
when operating multiple rwblocks.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-09-07 13:51:29 +08:00
makejian
16a1655bba testing/crypto: fix aescbc crash when update iv
iv content always should be updated when performing encryption operation, so need update testing case
Signed-off-by: makejian <makejian@xiaomi.com>
2023-09-07 13:15:35 +08:00
fengxuesong
ee0bc579c1 solve CI compilation error problem
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-09-06 19:21:19 +03:00
yangguangcai
de82824fbf add test atomic
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-09-05 22:10:48 +08:00
guoshichao
c57794fe1f ltp/makefile: apply that patch that to fix the build warning in ltp
the origin ltp testcases has many build warnings which consider error in
Nuttx, thus to apply the patches to fix these build warnings

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-09-03 22:12:57 +08:00
simbit18
17a497492a Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Add comments
2023-09-01 01:21:54 +08:00
chenrun1
844a31b24c memtester:update format
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-29 17:07:58 +08:00
chenrun1
56045e8e3d memtester:Two new bit-width test items
Because it may cause unaligned access problems with some hardware, these
two tests are not turned on by default, and are enabled or disabled
through Kconfig.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-29 17:07:58 +08:00
chenrun1
de3746e2ba memtester:Adaptation of memtester
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-29 17:07:58 +08:00
chao an
6923c9cf57 testing: fix visual studio Compiler Error C2057
expected constant expression
The context requires a constant expression, an expression whose value is known at compile time.
The compiler must know the size of a type at compile time in order to allocate space for an instance of that type.

Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2057?view=msvc-170

Signed-off-by: chao an anchao@xiaomi.com
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 15:44:09 +08:00
dulibo1
afcc8d8f62 regulator:add testcase for regualtor register
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-29 13:41:08 +08:00
fangxinyong
512af7fbd7 ltp/makefile: filter testcases based on defconfig
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-08-25 21:17:56 +03:00