Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion src/utest/event_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,37 @@
*
* Change Logs:
* Date Author Notes
* 2021-08-15 liukang the first version
* 2021-08-15 liukang the first version
* 2023-09-15 xqyjlj change stack size in cpu64
* 2025-11-17 Ze-Hou add standardized utest documentation block
*/

/**
* Test Case Name: Kernel Core Event Test
*
* Test Objectives:
* - Validate the RT-Thread kernel event (rt_event) functionality
* - Test static and dynamic event object initialization, creation, deletion,
* sending, receiving, and detachment APIs
*
* Test Scenarios:
* - Initialize and detach a static event object with both PRIO and FIFO modes
* - Create and delete a dynamic event object (if RT_USING_HEAP is enabled)
* - Use multiple threads to send and receive event flags, testing both OR and AND logic
* - Test event sending and receiving with different flag combinations and timing
*
* Verification Metrics:
* - All uassert assertions pass without failure
* - Event objects are correctly initialized, created, detached, and deleted
* - Event flags are sent and received as expected, with correct logic and timing
*
* Dependencies:
* - Enable Event Test (RT-Thread Utestcases -> Kernel Core -> Event Test)
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] English: The term "Utestcases" should be written as "Utest cases" or "Unit test cases" for better readability and consistency with standard English terminology. However, note that "Utestcases" appears to be used consistently throughout the RT-Thread codebase (in Kconfig files and documentation), so this might be an intentional project-specific term.

中文: 术语 "Utestcases" 应写为 "Utest cases" 或 "Unit test cases" 以提高可读性并符合标准英语术语。但请注意,"Utestcases" 在整个 RT-Thread 代码库中(在 Kconfig 文件和文档中)使用一致,因此这可能是项目特定的有意术语。

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是menuconfig配置的菜单项,不用修改

* - Test on any RT-Thread supported platform (e.g., qemu-virt64-riscv)
*
* Expected Results:
* - After executing this test in msh, the expected output should be:
* "[ PASSED ] [ result ] testcase (core.ipc_event)"
*/

#include <rtthread.h>
Expand Down