-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[docs]:Add standardized function comment blocks for mutex test cases #10957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,37 @@ | |
| * 2021-09.01 luckyzjq the first version | ||
| * 2023-09-15 xqyjlj change stack size in cpu64 | ||
| */ | ||
|
|
||
| /** | ||
| * Test Case Name: RT-Thread Mutex Functional and Scheduling Validation | ||
|
Comment on lines
+12
to
+13
|
||
| * Test Objectives: | ||
| * - Verify correctness of static and dynamic mutex operations | ||
| * - Validate priority inheritance, recursive locking, timeout handling, and error cases | ||
| * - Test core mutex APIs: rt_mutex_init/detach, rt_mutex_create/delete, | ||
| * rt_mutex_take/trytake/release, and related thread scheduling functions | ||
| * Test Scenarios: | ||
| * - Mutex acquisition under contention with multi-thread scheduling | ||
| * - Try-take on locked mutex, timeout-based take, recursive take sequence | ||
| * - Priority inheritance when high-priority threads are blocked by lower-priority holders | ||
| * - Behavior differences between static and dynamic mutexes | ||
| * - Mutex release error handling, invalid release, and cleanup | ||
| * Verification Metrics: | ||
| * - Correct return codes for all mutex operations (RT_EOK, timeouts, error states) | ||
| * - Proper priority inheritance and restoration during contention | ||
| * - Expected thread wake-up and state transition behavior | ||
| * - Successful thread synchronization via _sync_flag | ||
| * Dependencies: | ||
| * - RT-Thread kernel with IPC and mutex support enabled | ||
| * - Heap availability when testing dynamic mutex creation | ||
| * - Scheduler operating normally with multi-thread preemption | ||
| * - Accurate system tick for timeout and delay validation | ||
| * Expected Results: | ||
| * - All mutex APIs behave according to RT-Thread specifications | ||
| * - Static and dynamic mutex tests complete successfully | ||
| * - Priority inversion resolved via priority inheritance | ||
| * - Console/log output indicates all UTEST cases pass | ||
| */ | ||
|
|
||
| #define __RT_IPC_SOURCE__ | ||
|
|
||
| #include <rtthread.h> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Description Incomplete / PR 描述不完整
English: The PR description references issue #10895 but does not explain:
src/utest/mutex_tc.candsrc/utest/mutex_pi_tc.c)Please update the PR description to include these details as per RT-Thread contribution guidelines.
中文:PR 描述引用了 issue #10895,但未说明:
src/utest/mutex_tc.c和src/utest/mutex_pi_tc.c)请根据 RT-Thread 贡献指南更新 PR 描述以包含这些详细信息。