1.rename original mm folder to heaptest and move it to mm folder
2.move the following folders into the new mm folder:
cachetest, heaptest, iob, kasantest, memstress, memtester, ramtest, stressapptest
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
cmocka_driver_gpio //gpio input/output is tested by default
cmocka_driver_gpio -a /dev/gpio0 -b /dev/gpio1 -l // test loop
cmocka_driver_gpio -a /dev/gpio0 -b /dev/gpio0 // gpio input/output is tested by default
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
==1805058==ERROR: AddressSanitizer: heap-use-after-free on address 0xe18126a0 at pc 0x52b06320 bp 0xd7b13ee8 sp 0xd7b13ed8
READ of size 1 at 0xe18126a0 thread T0
#0 0x52b0631f in tre_parse regex/regcomp.c:1356
#1 0x52b2b1d0 in regcomp regex/regcomp.c:3710
#2 0x48f55435 in c_regexmatch cmocka/src/cmocka.c:494
#3 0x48f65bcf in _cmocka_run_group_tests cmocka/src/cmocka.c:3252
#4 0x48f67e2d in cmocka_fs_test_main apps/testing/testsuites/kernel/fs/cmocka_fs_test.c:201
#5 0x46210b2a in nxtask_startup sched/task_startup.c:72
#6 0x45ff40fb in nxtask_start task/task_start.c:116
#7 0x462695bb in pre_start sim/sim_initialstate.c:52
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
Based on the original directory structure, an additional utils directory is added. It store public functions which used by multiple testcases, such as the tcp server-related functions added this time. In addition, two testcases for testing tcp connections have been added.
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
Clean up code by removing redundant and unused header file includes that were identified through static analysis.
This improves code readability and reduces unnecessary dependencies.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Provides a network automated testing framework, including the main directory structure and Makefile, CMakeLists, Kconfig and other files such as tcp.
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
After thread A holds the semaphore, it first accesses it safely. After releasing it, thread B closes MTE for unsafe access. After accessing, it switches back to thread A for unsafe access. At this time, an error should be reported.
log:
Process 1 holding lock
Process 2 holding lock
Process 1 holding lock again
default_fatal_handler: (IFSC/DFSC) for Data/Instruction aborts: synchronous tag check fault
arm64_exception_handler: CurrentEL: MODE_EL1
arm64_exception_handler: ESR_ELn: 0x96000011
arm64_exception_handler: FAR_ELn: 0xf00000040441700
arm64_exception_handler: ELR_ELn: 0x402ee5f4
print_ec_cause: DABT (current EL)
print_ec_cause: Data Abort taken without a change in Exception level
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
apps/testing/nand_sim/nand_sim_main.c:172:(.text.nand_main+0x93): undefined reference to `nand_ram_initialize'
collect2: error: ld returned 1 exit status
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
Summary:
"",
instead of
" ",
to the first argument.
Test #29 returned 0 instead of 1.
Test #29 assigned
"",
instead of
" q",
to the first argument.
Test #30 returned 0 instead of 2.
Test #30 assigned
"",
instead of
" ",
to the first argument.
Test #30 assigned
"",
instead of
"Q",
to the second argument.
Test #31 returned 0 instead of 2.
Test #31 assigned
"",
instead of
"qwerty-",
to the first argument.
Test #31 assigned
"",
instead of
"QWERTY-",
to the second argument.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Summary:
Avoid blocking other tasks when there is a large amount of data, such
as rpmsg, etc.
1. change ramtest PRI to 90
2. change memtester PRI to 90
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
kernel/fs/cases/fs_stream_test.c:279:70: error: format ‘%zi’ expects argument of type ‘signed size_t’, but argument 4 has type ‘int’ [-Werror=format=]
279 | syslog(LOG_ERR, "len = %zi != return value from fwrite = %zi",
| ~~^
| |
| long int
| %i
280 | len, ret);
| ~~~
| |
| int
kernel/fs/cases/fs_stream_test.c:311:69: error: format ‘%zi’ expects argument of type ‘signed size_t’, but argument 4 has type ‘int’ [-Werror=format=]
311 | syslog(LOG_ERR, "len = %zi != return value from fread = %zi",
| ~~^
| |
| long int
| %i
312 | len, ret);
| ~~~
| |
| int
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
some test cases have been added that cover the functionality of fs, mutex, pthread, socket, and syscall
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Inside CI Build risc-v-05: `rv-virt:citest` fails with a Stack Overflow at ltp_interfaces_pthread_barrierattr_init_2_1:
- https://github.com/apache/nuttx/issues/15170
This PR doubles the Stack Size for `testing/ltp` (from 4096 bytes to 8192), so that `rv-virt:citest` completes successfully.
Added basic mte instructions, ldg, stg, irg, gmi instruction tests
➜ NX git:(master) ✗ qemu-system-aarch64 -cpu max -nographic \
-machine virt,virtualization=on,gic-version=3,mte=on \
-chardev stdio,id=con,mux=on, -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx/nuttx
- Ready to Boot Primary CPU
- Boot from EL2
- Boot from EL1
- Boot to C runtime for OS Initialize
NuttShell (NSH)
nsh>
nsh>
nsh> mtetest
Spawning process for test: mtetest1
Running test: mtetest1
Test 'mtetest1' completed
Spawning process for test: mtetest2
Running test: mtetest2
Test 'mtetest2' completed
Spawning process for test: mtetest3
Running test: mtetest3
Test 'mtetest3' completed
Spawning process for test: mtetest4
Running test: mtetest4
Test 'mtetest4' completed
Spawning process for test: mtetest5
Running test: mtetest5
Test 'mtetest5' completed
All tests completed.
nsh>
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
make[2]: *** No rule to make target '/home/nuttx/libs/libxx/uClibc++/tests/testframework.cpp',
needed by '/home/nuttx/libs/libxx/uClibc++/tests/testframework.cpp.home.apps.testing.uclibcxx_test.o'. Stop.
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
libuv:
CC: pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’:
libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known
174 | struct sched_param param;
| ^~~~~
btsak_main:
In file included from btsak_main.c:39:
btsak.h:149:1: error: unknown type name ‘bool’
149 | bool btsak_str2bool(FAR const char *str);
pipe_main.c:
CC: sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’
44 | static void *open_write_only(pthread_addr_t pvarg)
| ^~~~~~~~~~~~~~
pipe_main.c: In function ‘pipe_main’:
pipe_main.c:81:3: error: unknown type name ‘pthread_t’
81 | pthread_t writeonly;
redirect_test.c: In function ‘redirection_test’:
redirect_test.c:205:3: error: unknown type name ‘pthread_t’
205 | pthread_t readerid;
| ^~~~~~~~~
redirect_test.c:206:3: error: unknown type name ‘pthread_t’
206 | pthread_t writerid;
| ^~~~~~~~~
drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function)
48 | value = (type)strtoul(optarg, &ptr, base); \
drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
208 | sleep(SLEEPSECONDS);
| ^~~~~
drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
92 | len = read(fd, &tmp_char, 1);
| ^~~~
| fread
drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function)
323 | printf("Unknown option: %c\n", optopt);
kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration]
71 | ret = fs_getfilep(fileno(fp), &filep);
| ^~~~~~~~~~~
kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
148 | pid = task_create("TestNuttx08_routine_1",
| ^~~~~~~~~~~
| timer_create
/home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration]
171 | setenv("CMOCKA_XML_FILE", xml_path, 1);
| ^~~~~~
drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
123 | usleep(210 * 1000);
| ^~~~~~
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
stdio.h remove <nuttx/xxxx.h> Some .c previously depended on
<nuttx/xxx.h> and needed to be added to .c instead of stdio.h
Signed-off-by: anjiahao <anjiahao@xiaomi.com>