summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2025-09-24RT_TIMER_CTRL_SET_TIME and RT_TIMER_CTRL_GET_TIME should both use rt_tick_tYonggang Luo
2025-09-23[utest][cpp]add cpp-smartptr testcase.Rbb666
2025-09-23[utest][cpp]add cpp-lambda testcase.Rbb666
2025-09-23[utest][cpp]add cpp-auto testcase.Rbb666
2025-09-23[utest][cpp]add cpp-mutex testcase.Rbb666
2025-09-23[utest][cpp]add cpp-atomic testcase.Rbb666
2025-09-23[utest][cpp]rename thread_tc.cpp to tc_thread.cpp.Rbb666
2025-09-09[add][thread]Add api:rt_thread_suspend_force allow suspend other threads.Rbb666
2025-09-07fix ci problem.Rbb666
2025-09-07[add][testcase]add mempool tc.Rbb666
2025-09-02utest/utest: intergare testcases into utest framework (#10665)Chen Wang
* utest: move testcases of Utest from example to Utest folder Create unit-test-cases for the Utest framework subsystem according to "How to add utest cases into RT-Thread for your module." [1] Link: https://rt-thread.github.io/rt-thread/page_component_utest.html#autotoc_md804 [1] The original `components/utilities/utest` directory already has unit testcases, which are more comprehensive than the testcases in `examples/utest/testcases/utest/`. Therefore, simply deleted the test cases in `examples` and used the existing testcases in the utest framework. Signed-off-by: Chen Wang <[email protected]> * utest/utest: rename name and add license text Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-09-02[Add][kernel/thread]Add thread overflow hook and testcases:thread_overflow_tc.c.Rbb666
2025-08-26utest: move entry from examples to utestChen Wang
Change the entry of utest's Kconfig from 'examples/utest/testcases/Kconfig' to 'Kconfig.utestcases'. Modified the build scripts where the path name is "examples/utest/testcases/Kconfig" and changed it to 'Kconfig.utestcases', otherwise build operations such 'scons --dist' may fail. In the future, the testcase source code of utest will be placed in each module for maintenance, but the entry of Kconfig will all be placed in Kconfig.utestcases for unified maintenance. In this way, when executing menuconfig, people can enter and configure from one place, avoiding searching for utest configuration switches here and there in the menuconfig interface. For each module, you can maintain unit-test in a unified manner in the following way: - Create a subdirectory named 'utest' in the directory where your module is located. - Store the following files in the utest subdirectory: - Unit test case program source code files for this module. - Kconfig file, add configuration options for the unit test files of this module, the recommended option is named RT_UTEST_TC_USING_XXXX, XXXX is the global unique module name of this module. - SConscript file, note that when adding src files, in addition to relying on RT_UTEST_TC_USING_XXXX, you must also rely on RT_UTEST_USING_ALL_CASES, the two dependencies are in an "or" relationship. The role of RT_UTEST_USING_ALL_CASES is that once this option is turned on, all unit tests will be enabled to avoid selecting one by one. After completing the above steps, add the path of the Kconfig file of utest of this module to the Kconfig.utestcases file. Signed-off-by: Chen Wang <[email protected]>
2025-08-16[component][drivers][serial_v2] 优化serial_v2 (#10603)RyanCW
* [bsp][stm32][drv_usart_v2] uart_isr不再使用链式调用,RXNE内循环读空,一些细节优化 * [componnents][drivers][serial_v2] 增加获取config接口,使用rt_tick_get_delta替代内部的时间绕回判断,写满丢弃策略rx接收数据错乱修复,clang-tidy和cppcheck审查优化 * [utest][drivers][serial_v2] 测试例程进行优化 * [bsp][stm32][drv_usart_v2] 撤回DMAMUX1修改 * [componnents][drivers][serial_v2] read和write不再返回-RT_ETIMEOUT改为已发送或读取的字节数,细节优化 * [utest][drivers][serial_v2] 增加单独的timeout测试,减少测试中的硬延时 * [utest][drivers][serial_v2] 漏提交的posix下标志位 * [utest][drivers][serial_v2] 优化测试例程 * [bsp][stm32][drv_usart_v2] transmit返回错误值,RXNE增加超时逻辑 * [componnents][drivers][serial_v2] 增加transmit错误处理,增加超时退出机制显式的避免死循环 * [componnents][drivers][serial_v2] 适配serial_v2和posix非libc标准库下的console和shell
2025-07-30fix(kernel)/improve(utest):fix the legacy issue related to the length of the ↵Yuqiang Wang
object name version #10537
2025-07-18kernel/testcase: fixed buffer overflow vulnerability in objectkurisaw
2025-07-16testcase: add system performance testcase (#10452)rcitach
* add sys pref frameworks * add context switch test code * add irq latency test code * add thread sem test code * add thread event test code * add thread mbox test code * add thread mq test code * Adding a Test Documentation Note * Modification of text description
2025-05-16[drivers][serial_v2]允许阻塞接收超过rx缓冲区大小的数据、增 ↵ryancw
加超时时间、flush、获取缓冲区数据长度命令、数据溢出逻辑修复、稳定性细节优化、添加更多serial_v2测试用例 [components][serial_v2] 优化txflush逻辑、对tx的activated做中断保护 [components][at] at_client适配新版serial_v2 [components][at] at_server适配新版serial_v2 [components][serial_v2] 测试用例增加循环调用,format测试用例 [components][serial_v2] poll模式判断逻辑错误 [components][serial_v2] 测试用例去掉一些非必要延时 [components][serial_v2] 测试例程使用menuconfig进行配置,更新readme [components][at_client] at_client_getchar返回值错误、at_client解析线程优先级错误设置 [components][at] 错误码应该返回负值 [components][serial_v2] TCFLSH和FIONREAD完善、control函数增加错误返回值 [components][serial_v2] RT_SERIAL_CTRL_GET_RX_DATA_LEN更改为RT_SERIAL_CTRL_GET_UNREAD_BYTES_COUNT [utest][serial_v2] TC_UART_SEND_TIMES替换为RT_SERIAL_TC_SEND_ITERATIONS [components][serial_v2] FIONREAD参数应该是无符号类型 [utest][serial_v2] 完善测试用例 [components][serial_v2] 避免使用三目运算符 [components][serial_v2] 使用clang-format格式化代码 [components][serial_v2] 添加get超时时间命令 [components][serial_v2] 完善posix接口 [components][serial_v2] 阻塞接口添加阻塞时间为0时的处理逻辑、优化RX阻塞接收逻辑 [components][serial_v2] 设置超时时间命令的参数改为指针形式 [components][serial_v2] nbuf发送添加超时时间为0时的逻辑 [components][serial_v2] 完善添加测试用例 [utest][serial_v2] 修复依赖关系 [components][serial_v2] 非阻塞模式下tx_flush错误修复 [components][serial_v2] activated使用原子API [components][serial_v2] 优化DMA逻辑、没使能DMA时屏蔽DMA逻辑节约资源 [components][serial_v2] 提供写满时丢弃新数据和覆盖旧数据策略,写满丢弃策略效率更高 [components][serial_v2] 部分平台适配写满时两种策略功能 [components][serial_v2] DMA模式暂不支持丢弃新数据策略 [utest][serial_v2] 优化测试代码 [components][serial_v2] DMA模式下使用乒乓缓冲、DMA模式支持丢弃新数据策略 [utest][serial_v2] 适配DMA乒乓缓冲 [bsp][serial_v2] 部分bsp适配DMA下乒乓缓冲 [components][serial_v2] 使用spinlock替换中断,对部分结构体变量使用原子操作 [utest][serial_v2] 更新测试用例 [components][at] 适配new serialv2不再判断RTT版本号 [components][at] 删除多余的中文注释 [utest][serial_v2] 添加交叉echo示例,qemu环境下专用 [bsp][qemu] 适配串口v2并开启fifo [components][at] 修复合并导致的错误 [bsp][n32] 适配serial_v2,没有经过测试 [components][serial_v2] 格式化代码 [utest][serial_v2] 删除无意义的打印
2025-01-01[utest][wq]add workqueue_tc (#9850)Rbb666
* [utest][wq]add workqueue_tc. * [action][ci]ci添加wq测试用例
2024-12-17[serial] add bypass testcase in utestzhujiale
2024-11-27[sscanf] use rt_sscanf to replace sscanfMeco Man
2024-11-03:truck: renaming: move `smp` to `smp_call`Shell
2024-11-03utest: smp_call: add smoke test casesShell
Signed-off-by: Shell <[email protected]>
2024-09-24smp_ipizhujiale
2024-09-24smpzhujiale
2024-09-24smpzhujiale
2024-09-24SMPzhujiale
2024-09-24SMPzhujiale
2024-09-24smp_callzhujiale
2024-09-24smp_callzhujiale
2024-09-11[utest]fix race in mutex tc & add recurse lock tczms123456
2024-09-06[utest]add mutex_pi_tczms123456
* add mutex_pi * fix assertion error when thread wakeup while waiting mutex
2024-09-03[add] 修改线程栈大小为UTEST_THR_STACK_SIZEYaochenger
2024-09-03[utest] add smp testcasesYaochenger
2024-08-15删除rt_thread_sleep遗留Meco Man
2024-07-22[utest] feat: print progress on testingShell
This is required so the user will not be confused on waiting for test to complete. Changes: - notify user that the test is not corrupted - expand waiting tick on timed mtx test, for compatibility on different hw. Signed-off-by: Shell <[email protected]>
2024-06-20除了bsp之外的Kconfig使用rsource替代sourcelatercomer
2024-06-20[timer]add all soft timer config (#9048)zms123456
* add all soft timer * update wq * add timer test * shield LOG_D
2024-06-13[fix]fix tmpfs bug (#8970)zhuzhuzhu
* first * second * thrid * Update SConscript * tmpfs testcase default n * Update dfs_tmpfs.c * format document --------- Co-authored-by: zhujiale <[email protected]>
2024-06-07[mm] precise & readable mm fault type (#9047)Shell
* [smart] fixup: precise mm fault type Also, fixup arm64 read access fault * arm64: using meaningful macro on trap * fixup: renaming macro
2024-05-21[utest] add device find (#8959)Shell
* [utest] add device find Signed-off-by: Shell <[email protected]> * fixup: add test * fixup: ptr aliasing * quality: meaning parameter --------- Signed-off-by: Shell <[email protected]>
2024-05-16[libcpu/arm64] add C11 atomic ticket spinlock (#8882)Shell
* [libcpu/arm64] add C11 atomic ticket spinlock Replace the former implementation of flag-based spinlock which is unfair Besides, C11 atomic implementation is more readable (it's C anyway), and maintainable. Cause toolchain can use their builtin optimization and tune for different micro-architectures. For example armv8.5 introduces a better instruction. The compiler can help with that when it knows your target platform in support of it. Signed-off-by: Shell <[email protected]> * fixup: RT_CPUS_NR --------- Signed-off-by: Shell <[email protected]>
2024-05-08[ipc] support of lockless rt_completion (#8887)Shell
* [ipc] lockless rt_completion implementation The new rt_completion implemented by lockless algorithm can improve timer resolution for up to ~12%, compare to sem IPC. Signed-off-by: Shell <[email protected]> * fixup: error * remove useless changes --------- Signed-off-by: Shell <[email protected]>
2024-04-18[mem] Remove useless code And Update mem documentationwdfk-prog
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-01-16[kservice] MT-safe output support (kprintf/kputs)Shell
Signed-off-by: Shell <[email protected]>
2024-01-02[kernel] support for hook listShell
Signed-off-by: Shell <[email protected]>
2023-12-28[examples][tcpserver]打印错误值errnoyangpeng
2023-12-28[examples]更正tcp例程中recv/send返回值判断yangpeng