feature: utest: add standardized utest documentation to hooklist_tc
ToolsCI / Tools (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled

Signed-off-by: Ze-Hou <yingkezhou@qq.com>
This commit is contained in:
Ze-Hou
2025-11-13 16:23:15 +08:00
committed by R b b666
parent ddfe2cd61c
commit 538e5ff6d5
+29
View File
@@ -6,6 +6,35 @@
* Change Logs:
* Date Author Notes
* 2023-12-22 Shell Support hook list
* 2025-11-11 Ze-Hou Add standardized utest documentation block
*/
/**
* Test Case Name: Kernel Core Hook List Test
*
* Test Objectives:
* - Validate the RT-Thread hook list mechanism for thread initialization events
* - Test registration, invocation, and removal of thread-initialized hooks
*
* Test Scenarios:
* - Register two hook nodes for thread initialization
* - Initialize a thread and check that both hooks are called
* - Remove one hook and re-initialize the thread, verifying only the remaining hook is called
* - Detach thread and clean up hooks after test
*
* Verification Metrics:
* - hooker1_ent_count and hooker2_ent_count increment as expected
* - After first thread init: both counters == 1
* - After second thread init (with one hook removed): hooker1_ent_count == 2, hooker2_ent_count == 1
* - After running this test case, check whether all assertions pass.
*
* Dependencies:
* - Enable Hook List Test (RT-Thread Utestcases -> Kernel Core -> Hook List 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.hooklist)"
*/
#include <rtthread.h>