summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZe-Hou <[email protected]>2025-11-19 10:38:26 +0800
committerR b b666 <[email protected]>2025-11-19 10:49:17 +0800
commit75f1d8d0dc61761661f3f138170943d34ef87ebb (patch)
tree3c14a39976416e39536a045002bf705138a0fa0b /src
parentc745319c5665965c4117a9c41e0b0aad022f936f (diff)
feature: utest: add standardized utest documentation to messagequeue_tc
Signed-off-by: Ze-Hou <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/utest/messagequeue_tc.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/utest/messagequeue_tc.c b/src/utest/messagequeue_tc.c
index 3239fff528..df17705dbb 100644
--- a/src/utest/messagequeue_tc.c
+++ b/src/utest/messagequeue_tc.c
@@ -8,6 +8,44 @@
* 2021-08-28 Sherman the first version
* 2023-09-15 xqyjlj change stack size in cpu64
* fix in smp
+ * 2025-11-17 Ze-Hou add standardized utest documentation block
+ */
+
+/**
+ * Test Case Name: Kernel Core Message Queue Test
+ *
+ * Test Objectives:
+ * - Validate the RT-Thread kernel message queue (rt_messagequeue) functionality
+ * - Test static and dynamic message queue creation, initialization, sending,
+ * receiving, urgent send, priority send, reset, detach, and delete APIs
+ *
+ * Test Scenarios:
+ * - Initialize a static message queue and verify correct setup
+ * - Create a dynamic message queue and verify allocation
+ * - Send messages to the queue until full, test blocking and non-blocking send,
+ * urgent send, and priority send (if enabled)
+ * - Receive messages from the queue, verify order and data integrity, including
+ * priority receive (if enabled)
+ * - Reset the message queue and verify it is empty
+ * - Detach and delete message queues, ensuring resources are released
+ * - Use multiple threads to simulate concurrent send/receive operations
+ *
+ * Verification Metrics:
+ * - All uassert assertions pass without failure
+ * - Message queues are created, initialized, detached, and deleted successfully
+ * - Messages are sent and received in correct order and with correct data
+ * - Blocking and non-blocking operations behave as expected
+ * - Urgent and priority send/receive functions work correctly (if enabled)
+ *
+ * Dependencies:
+ * - Enable message queue priority (RT-Thread Kernel -> Inter-Thread communication
+ * -> Enable message queue priority)
+ * - Enable Message Queue Test (RT-Thread Utestcases -> Kernel Core -> Message Queue Test)
+ * - 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.messagequeue)"
*/
#include <rtthread.h>