Skip to content

Commit 75f1d8d

Browse files
Ze-HouRbb666
authored andcommitted
feature: utest: add standardized utest documentation to messagequeue_tc
Signed-off-by: Ze-Hou <[email protected]>
1 parent c745319 commit 75f1d8d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/utest/messagequeue_tc.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,44 @@
88
* 2021-08-28 Sherman the first version
99
* 2023-09-15 xqyjlj change stack size in cpu64
1010
* fix in smp
11+
* 2025-11-17 Ze-Hou add standardized utest documentation block
12+
*/
13+
14+
/**
15+
* Test Case Name: Kernel Core Message Queue Test
16+
*
17+
* Test Objectives:
18+
* - Validate the RT-Thread kernel message queue (rt_messagequeue) functionality
19+
* - Test static and dynamic message queue creation, initialization, sending,
20+
* receiving, urgent send, priority send, reset, detach, and delete APIs
21+
*
22+
* Test Scenarios:
23+
* - Initialize a static message queue and verify correct setup
24+
* - Create a dynamic message queue and verify allocation
25+
* - Send messages to the queue until full, test blocking and non-blocking send,
26+
* urgent send, and priority send (if enabled)
27+
* - Receive messages from the queue, verify order and data integrity, including
28+
* priority receive (if enabled)
29+
* - Reset the message queue and verify it is empty
30+
* - Detach and delete message queues, ensuring resources are released
31+
* - Use multiple threads to simulate concurrent send/receive operations
32+
*
33+
* Verification Metrics:
34+
* - All uassert assertions pass without failure
35+
* - Message queues are created, initialized, detached, and deleted successfully
36+
* - Messages are sent and received in correct order and with correct data
37+
* - Blocking and non-blocking operations behave as expected
38+
* - Urgent and priority send/receive functions work correctly (if enabled)
39+
*
40+
* Dependencies:
41+
* - Enable message queue priority (RT-Thread Kernel -> Inter-Thread communication
42+
* -> Enable message queue priority)
43+
* - Enable Message Queue Test (RT-Thread Utestcases -> Kernel Core -> Message Queue Test)
44+
* - Test on any RT-Thread supported platform (e.g., qemu-virt64-riscv)
45+
*
46+
* Expected Results:
47+
* - After executing this test in msh, the expected output should be:
48+
* "[ PASSED ] [ result ] testcase (core.messagequeue)"
1149
*/
1250

1351
#include <rtthread.h>

0 commit comments

Comments
 (0)