Commit Graph

531 Commits

Author SHA1 Message Date
dulibo1
7893712622 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-10-25 16:13:30 +02:00
dulibo1
893ac88f97 batterydump:move to system dir
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
dulibo1
734baae5a2 test case update follow the regualtor framework
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02: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 142df1a001.
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
liuhongchao
23278f4558 apps/dirvertest: Fix cmocka --list serial port hang
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
7efa80aa51 apps/drivertest: Fix run cmocka_driver_framebuffer No display on the screen
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
0d9b8a8fbf drivertest: Fix run cmocka_driver_touchpanel crash
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
6ec9d880c4 drivertest: Fix No display when running cmocka_driver_framebuffer
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
guoshichao
7b5e54cd7b ostest/fpu.c: fix the greenhills compile warning
CC:  binfmt_unregister.c "fpu.c", line 98: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

"fpu.c", line 99: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-20 02:50:13 +08:00
guoshichao
8cb59a75ea ltp: fix the build warning
the warning are:
ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:163: warning: "NSIG" redefined
  163 | #define NSIG (sizeof(signals)/sizeof(int))
      |
In file included from /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/pthread.h:35,
                 from ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:31:
/home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/signal.h:53: note: this is the location of the previous definition
   53 | #define NSIG            _NSIG           /* _NSIG variant commonly used */

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:00:57 +08:00
guoshichao
4e9ae2d45a ltp: fix the link error raised by "proc.h" inclusion error
the link error are:
arm-none-eabi-ld: /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-4.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o): in function `tst_process_state_wait3':
/home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: multiple definition of `tst_process_state_wait3'; /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-3.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o):/home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: first defined here

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:00:57 +08:00
chenrun1
57cb20b63a ramtest:Fixed the problem of printing variables in 32/64-bit environment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 03:14:24 +08:00
zhangchao53
204326c236 porting fake function framework 2024-08-17 13:46:03 +08:00
zhangshoukui
ff85c8c0d9 fstest: If the file is deleted it will not be opened
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-08-16 19:48:18 +08:00
Marco Casaroli
96100b30f2 feat(nsh): input (stdin) redirection
This adds support for `<` to redirect input on nsh commands.
2024-08-08 19:19:18 -03:00
chenrun1
09ec04760f cachetest:Tools for testing cache and uncacheable
Summary:
  A tool is provided to test the case of data correctness after cache flush. It requires an uncacheable offset to check whether the uncacheable address is consistent with the data in the buffer after calling up_dcache_flush.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-07 10:03:16 +08:00