578 Commits

Author SHA1 Message Date
liugui
9353bcefa2 skip oneshot timer test
Signed-off-by: liugui <liugui@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-28 22:51:12 +08:00
dengwenqi
41bc4f7873 testing/stressapptest: fix: git status --ignore normalization check problem
Signed-off-by: dengwenqi <dengwenqi@xiaomi.com>
2024-10-28 00:40:37 +01:00
zhuanglin
5b2397b595 testing/fatutf8:fix Out of bounds writing
Signed-off-by: zhuanglin <zhuanglin@xiaomi.com>
2024-10-27 22:30:39 +08:00
zhangchao53
1ddeaa1468 testing/cmocka: shuffling test sequence and pass seed arg
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2024-10-27 20:01:51 +08:00
xuxin19
b4c2e6bf46 build(bugfix):remove unused cmake scrpits
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-27 14:05:17 +08:00
wangmingrong1
a7a03a9e5a kasantest: Add some tests for legitimate and illegitimate operations of memory APIs
1. By printing the results, you can know which libc memory APIs in the
current system support kasan check; for examples:
KASan Test: heap underflow -> PASS
KASan Test: heap overflow -> PASS
KASan Test: heap use after free -> PASS
KASan Test: heap invalid free -> PASS
KASan Test: heap double free -> PASS
KASan Test: heap poison -> PASS
KASan Test: heap unpoison -> PASS
KASan Test: heap illegal memchr -> PASS
KASan Test: heap illegal memcpy -> PASS
KASan Test: heap illegal memcmp -> PASS
KASan Test: heap illegal memmove -> PASS
KASan Test: heap illegal memset -> PASS
KASan Test: heap illegal strcmp -> PASS
KASan Test: heap illegal strcpy -> PASS
KASan Test: heap illegal strlen -> FAIL
KASan Test: heap illegal strncpy -> FAIL
KASan Test: heap illegal strchr -> PASS
KASan Test: heap illegal strncmp -> PASS
KASan Test: heap illegal strnlen -> FAIL
KASan Test: heap illegal strrchr -> PASS
KASan Test: heap legal memchr -> PASS
KASan Test: heap legal memcpy -> PASS
KASan Test: heap legal memcmp -> PASS
KASan Test: heap legal memmove -> PASS
KASan Test: heap legal memset -> PASS
KASan Test: heap legal strcmp -> PASS
KASan Test: heap legal strlen -> PASS
KASan Test: heap legal strlen -> PASS
KASan Test: heap legal strncpy -> PASS
KASan Test: heap legal strchr -> PASS
KASan Test: heap legal strncmp -> PASS
KASan Test: heap legal strnlen -> PASS
KASan Test: heap legal strrchr -> PASS
KASan Test: globals underflow -> PASS
KASan Test: globals overflow -> PASS

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-22 23:14:50 +08:00
zhangshoukui
8b17cfedf2 drivertest_i2c_spi: Supports incoming device nodes so we can test both iic and spi
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-10-18 19:56:40 +08:00
chenzihan1
f426265ab2 testing: mm test will be skipped to prevent memory overflow
In the mm test, if the memory requested this time exceeds 3/4 of the remaining memory,
the request will be skipped to avoid insufficient memory.

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2024-10-17 23:29:41 +08:00
cuiziwei
b022a71480 cxxsize: Updata code size.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-16 17:10:33 +02:00
ouyangxiangzhen
880e2661dc apps/testing: Introduce timerjitter test case
This commit introduces the timerjitter test case, designed for assessing timer accuracy quickly. It is a simplified cyclictest implementation, optimized for fast and effective testing of timer precision.
The program sets up a periodic timer and awaits the firing of SIGALRM. Upon signal arrived, it computes the time difference between consecutive periods. A smaller time difference indicates higher time accuracy.
You can execute timerjitter without passing any arguments. Alternatively, you have the option to pass '-p' to print the time difference after each period, or provide additional arguments to customize the timer interval (in microseconds) and the number of test iterations.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-16 17:09:51 +08:00
Yongrong Wang
3514c6c704 drivertest/Makefile: add CONFIG_BUILD_FLAT limit for drivertest_block.c
If BUILD_FLAT is not enabled, the app and CPU run in user mode and
kernel mode respectively. The kernel and app are in different
memory address spaces. Different apps are in the same memory address
space. drivertest_block.c cannot directly call the kernel API.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-16 12:34:25 +08:00
jihandong
eca0928319 cxxtest: optional stream test.
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-16 07:20:47 +08:00
Yongrong Wang
a486129907 testing/drivertest_block.c: Fix cmoka driver block test error
1. Fix the problem that pre->source may have memory stampede
2. Fix total block size larger than cache size condition

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-16 07:18:20 +08:00
yintao
0e519328c8 fstest: Add header to fix build issues
Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-16 07:17:20 +08:00
ouyangxiangzhen
44d2250b6e apps: Fix compilation error after nuttx/arch.h excluded.
This patch fix compilation error after excluding nuttx/arch.h.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-16 07:12:40 +08:00
Gao Jiawei
30215c260b add test for longjump with 0 as return value
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-16 07:12:10 +08:00
yangguangcai
3f08d4f11c rtc: change localtime to gmtime.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-16 07:11:40 +08:00
ligd
0e8a6ee2d2 Revert "add test for longjump with 0 as return value"
This reverts commit 63542f83c2985723071ae7e428311213008aa108.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-14 13:31:47 +08:00
Gao Jiawei
63542f83c2 add test for longjump with 0 as return value
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-13 10:50:58 +08:00
Yongrong Wang
67fa0e89ff driverteset_block.c: Reduce the stack consumption
1. By reducing the use of local variables geometry
2. Use structure pre_build_s pointers instead of using the
structure directly

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-12 10:36:20 +08:00
cuiziwei
e50627ecd6 apps/testing:Add c++ STL code size test case.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 18:31:14 +08:00
pengyiqiang
f1fc3616d0 testing/monkey: add screen offset config support
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-10-09 22:40:15 +08:00
ligd
32e8b8e8ae mps2: add zero-latency-interrupt case on mps2
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 05:10:07 +08:00
W-M-R
8d1966e9fc kasantest: Fix compilation warning
signed-off-by: W-M-R <Mike_0528@163.com>
2024-10-02 21:10:22 +08:00
wangmingrong1
94a6f1837a kasantest: add CMakeLists.txt
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-02 21:10:22 +08:00
wangmingrong1
1fb3687eaa kasantest.c: fix the size passed by mm_initialize is incorrect
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-02 21:10:22 +08:00
Petro Karashchenko
161c996079 apps: use sizeof array in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-02 10:40:05 +02:00
yangguangcai
302c1f9dca drivertest_watchdog:change busyloop after capture.
busyloop should be after sem_init and WDIOC_CAPTURE.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
19a63bdc19 watchdog: change usleep to up_udelay.
change uleep to up_udelay prevent system into lower
power mode and watchdog be pause stop count.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
6358b481fb test/watchdog:add test case for capture.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
5d9d27d505 drivertest:fix compile error.
arm-none-eabi-ld: /home/ygc/ssd/vela_n62_4.0/nuttx/staging/libapps.a(drivertest_watchdog.c.home.ygc.ssd.vela_n62_4.0.apps.testing.drivertest.o): in function `cmocka_driver_watchdog_main':
/home/ygc/ssd/vela_n62_4.0/apps/testing/drivertest/drivertest_watchdog.c:480: multiple definition of `cmocka_driver_watchdog_main'; /home/ygc/ssd/vela_n62_4.0/nuttx/staging/libapps.a(drivertest_watchdog.c.home.ygc.ssd.vela_n62_4.0.apps.testing.drivertest.o):/home/ygc/ssd/vela_n62_4.0/apps/testing/drivertest/drivertest_watchdog.c:480: first defined here

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
d02596835f drivertest/watchdog:add parameter to avoid testing api getstatus.
some vendor hardware not support get watchdog status.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
xuxingliang
9cc9a830eb ostest/smpcall: add smp call from interrupt test
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 12:27:25 +08:00
ouyangxiangzhen
34e70e7f0c testing/ostest: Fix timing assertions in wdog_test
This patch removed timing assertions in wdog_test.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
3d6785bcaf testing/ostest: Fix busyloop on tee platform
This patch fixed busyloop on tee platform.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
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