Commit Graph

481 Commits

Author SHA1 Message Date
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
raiden00pl
12f91b7cee cmake: add support for Unity 2024-03-23 22:12:46 +01:00
vela-mib
74cf82f995 fix build warning for kernel testsuites
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-22 18:39:15 +08:00
Saurav Pal
f4092962df apps/testing/nand_sim: Adds NAND virtual device.
Adds a NAND virtual device daemon.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-03-21 22:46:49 +08:00
Juha Niskanen
ec4d7a19f7 ostest: add test for libc memmem() function
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2024-03-15 19:46:42 +08:00
zhangchao53
5519de826f fix compile error: list_initialize
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2024-03-15 19:46:00 +08:00
chao an
69e497f681 testing/ostest/cancel: joining a detached/canceled thread should return EINVAL, not ESRCH
Reference:
https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_join.html
  [EINVAL]
    The value specified by thread does not refer to a joinable thread.

https://docs.oracle.com/cd/E19120-01/open.solaris/816-5137/tlib-25/index.html

  EINVAL
    The thread corresponding to the given thread ID is a detached thread.

https://linux.die.net/man/3/pthread_join

  EINVAL
    thread is not a joinable thread.

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-13 18:06:36 +09:00
Juha Niskanen
767642b4ea testing/getprime: allow running with zero threads
getprime can now run without creating any additional threads. This helps
testing pthreads and measuring performance of directly searching primes
from main thread versus creating one thread.

Also don't misuse ASSERT() for checking command-line input coming
from user.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2024-03-12 19:40:17 +08:00
vela-mib
fec49af501 add cm_fs_test source code
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-03-11 11:24:13 +08:00
zhangchao53
7ad4a3dcb7 fix patch error:no such file
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2024-03-01 17:06:01 +08:00
Xiang Xiao
ea29af94c7 testing/fmemopen: Remove the back slash from long literal string
since the back slash is only needed for the long macro definition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-02-26 17:39:29 -03:00
vela-mib
02d212e829 fix pthread_sigmask_4_1 sigprocmask_4_1 build warning
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-02-23 04:11:17 -08:00
vela-mib
be74e34ede add mm/sched and open posix on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-02-22 06:55:01 -08:00
Yanfeng Liu
b32abfab39 build/ci: fix CI blocking unused variables/functions issues
This patch attempts to fix the blocking issues encountered with build
6374 of apps/pull/2300.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-02-21 18:38:53 -08:00
zhangchao53
f9f63dc8e1 add cmocka tools and fix __WORDSIZE not defined warning 2024-02-15 04:56:13 -08:00
raiden00pl
89cf6b4ce6 cmake: add smp test 2024-02-05 08:46:22 -08:00
raiden00pl
9921571674 cmake: add cachespeed 2024-02-05 08:46:22 -08:00
Yanfeng Liu
d381699ac1 testing/getprime: add cmake support
add CMakeLists.txt to support building with CMake

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-01-27 00:56:13 -08:00
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