Commit Graph

505 Commits

Author SHA1 Message Date
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
chenrun1
1d9f045068 testing/memstress:Fix FAR prefix
Summary:
  Add FAR before some pointer declarations

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-07 10:02:59 +08:00
chenrun1
74a8d98a32 testing/memstress:Support enabling multi-threaded stress testing in the program
Summary:
  Added "-x" to set the number of threads, the default is 1

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-07 10:02:59 +08:00
chenrun1
2413a2a4c8 testing/memstress:Initialize the pointer to avoid the pointer being unknown when the memory alloc fails
Summary:
  fix warning

In function 'memorystress_iter',
    inlined from 'memstress_main' at memorystress_main.c:475:10:
memorystress_main.c:289:10: error: 'ptr' may be used uninitialized [-Werror=maybe-uninitialized]
  289 |       if (ptr == NULL)
      |          ^
memorystress_main.c: In function 'memstress_main':
memorystress_main.c:248:20: note: 'ptr' was declared here
  248 |       FAR uint8_t *ptr;
      |                    ^~~

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-06 19:29:40 -03:00
Yanfeng Liu
ab2e45a86c ostest/fpu_test: enable for FLAT mode only
As per the `HAVE_FPU` in `fpu.c`, fpu_test is only available for
FLAT build. So user_main should enable fpu_test for FLAT build also,
otherwise ostest will fail for PROTECTED build.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-08-03 21:09:33 +08:00
Ville Juven
38ae8e7827 ostest: Enable vfork test for BUILD_KERNEL
The test was disabled because of a bug in the NuttX kernel, which is now
fixed. Obviously depends on the fix.
2024-08-01 23:25:19 +08:00
Windrow14
0989d820ed testing/[sd_bench|sd_stress]: make print compatible for both 32-bit and 64-bit environment.
Use size_t and %zu in printf of sd modules to fix compilation errors in 64-bit environment.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-07-04 17:43:32 +08:00
Windrow14
5330306aca testing/smart_test/smart_test.c: fix wrong offset in fseek
To seek to the last 30 bytes of the file, offset from SEEK_END
should be negative.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
2024-07-04 01:12:44 +08:00
raiden00pl
5d779386c8 lpt/Kconfig: hide TESTING_LTP_STACKSIZE option
hide TESTING_LTP_STACKSIZE option when TESTING_LTP=n
2024-07-04 01:12:27 +08:00
xuxin19
20c0a7243c cmake:port testing applications to CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-06-29 22:31:03 +08:00
Huang Qi
2e5a269e7f testing: Add simple debug test program
It is a simple test case of the NuttX debugging facilities (breakpoint and watchpoint).

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-06-26 00:19:26 +08:00
Yanfeng Liu
832cd28e52 testing/ostest: fpu.c for rv64ilp32
This revises fpu.c to support rv64ilp32

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-24 22:03:58 +08:00
buxiasen
cda5140c4d pm_rumtime: test shorten time, make compatible with SMP.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-21 10:20:11 +08:00
dongjiuzhu1
ee76427938 testing/ostest: temporary remove vfork test on arch/sim
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-05-24 15:41:32 +08:00
SPRESENSE
2ce6be617b testing/ostest: Fix config name
CONFIG_ARCH_HAVE_VFORK -> CONFIG_ARCH_HAVE_FORK
2024-05-16 10:49:22 -03:00
simbit18
a59797bbdd fix nxstyle
fix Relative file path does not match actual file.
2024-05-11 01:20:08 +08:00
simbit18
94ccbf0577 testing/ramtest/CMakeLists.txt: fix the names of the config entry
CONFIG_SYSTEM_ -> CONFIG_TESTING_
fix Relative file path does not match actual file.
2024-05-11 01:19:27 +08:00
Stuart Ianna
5f166c09be testing/sd_stress: Restrict variable and function scope to file only.
Add the static keyword to required function and variable delcaration to reduce their scope. Stops namespace pollution in CONFIG_BUILD_FLAT.
2024-05-08 16:52:28 +08:00
Stuart Ianna
cc8c3357f1 testing/sd_bench: Restrict variable and function scope to file only.
Add the static keyword to required function and variable delcaration to reduce their scope. Stops namespace pollution in CONFIG_BUILD_FLAT.
2024-05-08 16:52:28 +08:00
simbit18
dadbea7e3b fix nxstyle
fix Relative file path does not match actual file.
Add missing Apache Foundation copyright header
2024-04-30 00:02:31 +08:00
p-szafonimateusz
9088634e96 testing/ostest/fpu.c: align FPU context
some architectures requires FPU context to be aligned,
for example x86-64 when used with XSAVE instruction must be aligned to 64

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-04-29 10:10:07 +08:00
zhaoxingyu1
3cbda8a24c mtd_config_fs: support align size test
Originally 1-byte alignment, now supports n-byte alignment

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-04-16 19:05:44 +08:00
chao an
78a8dd27c9 Revert "testing/ostest/cancel: joining a detached/canceled thread should return EINVAL, not ESRCH"
This reverts commit 69e497f681.

In order to ensure the detached thread obtain the correct return
value from pthread_join()/pthread_cancel(), the detached thread
will create joininfo to save the detached status after thread
destroyed.  If there are too many of detached threads in the
process group, the joininfo will consume too much memory.
This is not friendly to embedded MCU devices.
This commit keep the semantics as #11898 was introduced,
will no longer save joininfo for detached threads to avoid wasting memory.

Refer PR:
https://github.com/apache/nuttx/pull/12106

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-09 13:45:39 +08:00
pengyiqiang
92d922a108 testing/monkey: fix unsigned zero comparison
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-04-08 14:32:08 +08:00
chenrun1
e6c3930b2d apps:Move the performance tools to benchmark.
1.ramspeed
2.cachespeed
3.osperf
4.iozone
5.superPI

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-08 14:11:31 +08:00
zhangchao53
322ce121a2 ignore zip file
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2024-04-04 12:07:21 +08:00
vela-mib
84e186c9d1 fix build warning for kernel testsuites
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-28 18:18:58 +08:00