543 Commits

Author SHA1 Message Date
ouyangxiangzhen
b01765c57d testing/ostest: Add recursive watchdog callback testcase
This patch added wdog recursive test cases.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-01 11:39:49 +08:00
zhangyuan29
54a8915f29 ostest: test wdog only in flat mode
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-01 11:39:49 +08:00
cuiziwei
e13d37f4d0 ostest:Ignore runtime error.
wdog.c:190:3: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long int'
    #0 0x40e35d3a in wdog_test_run /home/cuiziwei/ska/vela/vela-dev2/apps/testing/ostest/wdog.c:190
    #1 0x40e35e75 in wdog_test_thread /home/cuiziwei/ska/vela/vela-dev2/apps/testing/ostest/wdog.c:207
    #2 0x40773ffa in pthread_startup pthread/pthread_create.c:59
    #3 0x4495e037 in pthread_start pthread/pthread_create.c:139
    #4 0x40301864 in pre_start sim/sim_initialstate.c:52

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
cc13d4b742 ostest/wdog: Fix Coverity problems
This patch is to make Coverity happy.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
8c22bb267b testing/ostest: Add wdog_test to ostest
This patch introduces wdog_test, which is used to ensure the functional correctness of the wdog module.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
dulibo1
23dd23373d drivertest:add include file depended by cmocka
from the cmocka.h:
 * These headers or their equivalents MUST be included prior to including
 * this header file.
 * @code
 * #include <stdarg.h>
 * #include <stddef.h>
 * #include <stdint.h>
 * #include <setjmp.h>
 * @endcode

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-09-30 18:31:03 +08:00
dulibo1
b295d5de91 batterydump:move to system dir
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-30 18:31:03 +08:00
dulibo1
cd9d8bbfa9 test case update follow the regualtor framework
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-09-30 18:31:03 +08:00
Neo Xu
4a2809ffc0 ostest: fix smp call test
CONFIG_SMP_CALL has been removed from https://github.com/apache/nuttx/pull/13282

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-09-30 14:17:20 +08:00
makejian
28aa8a99d0 testing/hash: add hash test case for updating huge block once
The previous test case was relatively small( < 1k), and may only need to do data processing once. The encryption ability of large blocks of data cannot be tested.

Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-30 14:15:21 +08:00
makejian
b9764fd479 testing/aesctr: counter block should be initially set to one.
According to RFC-3686, the least significant 32 bits of the counter block are initially set to one in ctr mode of aes.

Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-30 14:15:21 +08:00
yangguangcai
fb37ef3671 test timer:change deviation to be pass as parameter.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-09-28 13:45:33 +08:00
yanghuatao
909e479d7f toolchain/ghs: Fix green hills toolchain build Vela warnings
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2024-09-28 10:47:32 +08:00
makejian
8545512dd7 testing/crypto: add ECDSA P256 testing case for asynchronous call
1. Add asynchronous call test into ecdsa test case.
2. Add command line parameters to facilitate subsequent expansion.
Now can test synchronous call through 'ecdsa -s SECP256R1' and test asynchronous call through 'ecdsa -a SECP256R1'

Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-28 10:46:53 +08:00
likun17
778ae8495b monkey: monkey_log.c add LIBC_PRINT_EXTENSION dependency.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-23 23:13:55 +08:00
likun17
ac11e3cba9 Adapt the new header file path of va_format.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-23 14:54:06 +08:00
Alan Carvalho de Assis
21f5bc9b70 testing/ramtest: Fix not updated CMake file
This issue was preventing ramtest to be displayed into
nsh (this is why all modifications need to be tested!!
"should work" doesn't work).

This is was discovered by user @nonpawite

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-09-20 10:55:06 +08:00
wangjianyu3
8764f502d5 testing/sensortest: Rename GPS to GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
ligd
ef95bd8d29 pthread_cleanup: move clenup down to tls
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-14 20:15:31 +08:00
xuxin19
9b8d8d0c4f cmake:fix testing cxx_main suffix error
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
wangmingrong1
7c94d13be4 kasantest: Add performance testing for Kasan, including pile insertion testing and algorithm testing
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
f2c21b11d8 kasantest: Add a test set for global variable out of bounds detection
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
277c968b6a kasantest: Add the ability to run a single program
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
797fd04796 kasantest: Fix errors running on 64 bit
1. Change 'heap' to a global variable. When using the software tag 'kasan', the base of 'heap' is dynamically changing, which may result in runtime errors
2. Modify the length of the argv array to ensure that all 64 bit addresses can be copied
3. After initialization, the registration of the heap must be canceled

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
yinshengkai
85ad50c39e testing: refactor kasan test
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-13 23:14:08 +08:00
makejian
7cd9919a46 testing/crypto: add rsa testcase
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
b1f2e63a6b testing/crypto: Add test cases for Diffie-Hellman algorithm
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
ce58e85aa6 testing/crypto: add ecdsa testing
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
b53ee36d47 testing/crypto: add aes-128-cmac testcase
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
6db82199a6 testing/crypto: add crc32 testcases
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
Shoukui Zhang
dad9b5afa3 drivertest: Modify output format
before:
slave size 4slave poll read     0       1       2       3
master write    0       1       2       3

now:
read size = 4
slave poll read         0       1       2       3
master write    0       1       2       3

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-09-13 12:33:25 +08:00
yuyun1
ed5ca1c512 i2c slave: add i2c slave test code
Signed-off-by: yuyun1 <yuyun1@xiaomi.com>
2024-09-13 12:33:25 +08:00
Xiang Xiao
2e01a7c7af Revert "ltp: handle low accuracy of time in some platfrom"
This reverts commit 142df1a001eee3d82469041774f10d0f2b15d336.
2024-09-10 23:33:37 +08:00
dongjiuzhu1
433ca0ff89 testing/fftest: add Force feedback driver test
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 14:16:16 +08:00
Huang Qi
c7c76534af testing/debug: Enhancement for watch address by cmd line
This patch add some command line arguments for debug
program, then you can use it to insert watchpoint or
breakpoint to arbitrary address at runtime.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 10:39:37 +08:00
ligd
142df1a001 ltp: handle low accuracy of time in some platfrom
some platform use TICK to calculate the time, for example
1tick = 1ms, when the test may run less then 1ms, then gettime()
before + sleep = after

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-07 17:10:48 -03:00
wangmingrong
396290962f tests: add kasan test
-u: This option is used to test the use of freed memory
-h: This option is used to test heap memory out-of-bounds access errors.
-g: This option is used to test global variables for out-of-bounds access errors.
-s: This option is used to test the Memory Stampede phenomenon.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-09-05 09:51:06 +08:00
hujun5
0b26b04081 ostest: smp_call only valid in FLAT BUILD
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 09:47:53 +08:00
yezhonghui
01964c6460 pci: add pcitest tool
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-08-27 22:07:57 +08:00
buxiasen
05def1befc testing: add case for irqprio, should only work with qemu MPS2_AN500
MPS2_AN500 have UART1,2,3,4, TIMER0,1, is a great board to do irqprio
test.
enable CONFIG_ARCH_IRQPRIO, and use
'qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin'
to lauch qemu

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-26 01:52:06 +08:00
zhangkai25
c2d478a93a apps/testing/drivertest_pwm.c: Fix apps/testing/drivertest_pwm.c compile_error
Description: Divide info.duty into two parts: multi-channel and single-channel

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-24 11:13:42 +08:00
buxiasen
09b114e884 testing/cpuload: increase thread prio
make simulate load can be more accurate in normal business code.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
buxiasen
fdfb2b2804 cpuload: make load more accurate
The 10 times is too short and can only support 10% step, make cpuload
delay based on 100 times, can decrease the influence of sched cost.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
dulibo1
92b916ab47 cpuload:testing program compile error when use CONFIG_SCHED_CPULOAD_SYSCLK
log:
CC:  setjmp.c cpuload_main.c: In function ‘cpuload_main’:
cpuload_main.c:38:45: error: ‘CONFIG_SCHED_CPULOAD_TICKSPERSEC’ undeclared (first use in this function); did you mean ‘CONFIG_SCHED_CPULOAD_TIMECONSTANT’?
   38 | #define CPULOAD_US          (USEC_PER_SEC / CONFIG_SCHED_CPULOAD_TICKSPERSEC)
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpuload_main.c:42:35: note: in expansion of macro ‘CPULOAD_US’
   42 | #define CPULOAD_DELAY       (10 * CPULOAD_US)

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
guanyi
60aea922a5 [testcase] add driver pm testcase
Signed-off-by: guanyi <guanyi@xiaomi.com>
2024-08-24 11:08:54 +08:00
chao an
054edfc653 testing/ostest: add nxevent test into ostest
Signed-off-by: chao an <anchao@lixiang.com>
2024-08-23 22:08:44 +08:00
yinshengkai
d37b326cb1 ostest: delete the code that accesses the internal fields of mutex
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-23 01:41:35 +08:00
ssssenai
5e5f518822 testing/himem_test: Verify the creation of himem and read/write character devices,
read/write multi block character devices, etc.
2024-08-22 15:18:24 +08:00
guohao15
909ab76eae app:port stressapptest to nuttx
stressapptest is a userspace test, primarily composed of threads doing memory copies
and directIO disk read/write. It allocates a large block of memory (typically 85% of
the total memory on the machine), and each thread will choose randomized blocks of
memory to copy, or to write to disk. Typically there are two threads per processor,
and two threads for each disk. Result checking is done as the test proceeds by
CRCing the data as it is copied.
https://github.com/stressapptest/stressapptest

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-21 17:07:52 +08:00
liuhongchao
3291c43db3 drivertest: Fix cmocka_driver_framebuffer is not displayed
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00