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>
1. Input redirect flags currently is hardcode, passing by arguments maybe better.
2. Only support redirect to path_name, redirect to fd is needed for pipeline.
Test
1. Redirect in
cat < /etc/init.d/rc.sysinit
2. Redirect with FIFO
mkfifo /dev/testfifo
cat /dev/testfifo &
ls > /dev/testfifo
3. NSH Params
set name `uname`
echo $name
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
Error: smp_call.c:36:31: error: 'g_call_data' defined but not used [-Werror=unused-variable]
36 | static struct smp_call_data_s g_call_data;
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/github/workspace/sources/apps/Application.mk:237: smp_call.c.github.workspace.sources.apps.testing.ostest.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[1]: *** [Makefile:52: /github/workspace/sources/apps/testing/ostest_all] Error 2
make[1]: Target 'all' not remade because of errors.
make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
Signed-off-by: hujun5 <hujun5@xiaomi.com>
reason:
The old implementation of the SMP call, even when using the "no wait" parameter,
could still result in waiting, if invoking it within a critical section
may lead to deadlocks. Therefore, in order to implement a truly asynchronous SMP
call strategy, we have added nxsched_smp_call_async.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
add cmake support
after enable TESTING_RESMONITOR, use showinfo -i 2 can show cpuload to
syslog every two seconds.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
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>
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>
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>
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>
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>