Skip to content

Commit b8c8c10

Browse files
committed
[docs]:Add standardized function comment blocks for mutex test cases
1 parent 55b365c commit b8c8c10

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/utest/mutex_pi_tc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,27 @@
99

1010
/**
1111
* Test Case Name: RT-Thread Mutex Priority Inheritance & Timeout Behavior Test
12-
*
1312
* Test Objectives:
1413
* - Verify RT-Thread mutex behavior under priority inheritance (PI)
1514
* - Validate timeout, wake-up, chained mutex dependency, and recursive PI updates
1615
* - Test APIs: rt_mutex_init/detach, rt_mutex_take/trytake/release,
1716
* rt_thread_create/startup, rt_thread_resume, rt_timer usage
18-
*
1917
* Test Scenarios:
2018
* - Multiple threads contending for shared mutexes with different priorities
2119
* - Main thread holding chained mutexes to trigger multi-level PI updates
2220
* - Mutex timeout behavior (RT_ETIMEOUT) with concurrent holder priority changes
2321
* - Wake-up of a waiting high-priority thread via external resume event
2422
* - Recursive dependency chain causing full-chain PI propagation and restoration
25-
*
2623
* Verification Metrics:
2724
* - Correct return codes (RT_EOK, -RT_ETIMEOUT, -RT_EINTR)
2825
* - Correct priority inheritance and rollback to init_priority
2926
* - Expected thread scheduling order and priority transitions
3027
* - All synchronization flags increment to expected values
31-
*
3228
* Dependencies:
3329
* - RT-Thread kernel with mutex and IPC components enabled
3430
* - Preemptive scheduler with priority-based dispatching
3531
* - System tick timer accuracy for delay/timeout verification
3632
* - Sufficient thread stack size for multi-thread test
37-
*
3833
* Expected Results:
3934
* - PI activates and restores correctly across simple and recursive mutex chains
4035
* - Timeout and wake-up tests return expected error codes

src/utest/mutex_tc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,33 @@
1111

1212
/**
1313
* Test Case Name: RT-Thread Mutex Functional and Scheduling Validation
14-
*
1514
* Test Objectives:
1615
* - Verify correctness of static and dynamic mutex operations
1716
* - Validate priority inheritance, recursive locking, timeout handling, and error cases
1817
* - Test core mutex APIs: rt_mutex_init/detach, rt_mutex_create/delete,
1918
* rt_mutex_take/trytake/release, and related thread scheduling functions
20-
*
2119
* Test Scenarios:
2220
* - Mutex acquisition under contention with multi-thread scheduling
2321
* - Try-take on locked mutex, timeout-based take, recursive take sequence
2422
* - Priority inheritance when high-priority threads are blocked by lower-priority holders
2523
* - Behavior differences between static and dynamic mutexes
2624
* - Mutex release error handling, invalid release, and cleanup
27-
*
2825
* Verification Metrics:
2926
* - Correct return codes for all mutex operations (RT_EOK, timeouts, error states)
3027
* - Proper priority inheritance and restoration during contention
3128
* - Expected thread wake-up and state transition behavior
3229
* - Successful thread synchronization via _sync_flag
33-
*
3430
* Dependencies:
3531
* - RT-Thread kernel with IPC and mutex support enabled
3632
* - Heap availability when testing dynamic mutex creation
3733
* - Scheduler operating normally with multi-thread preemption
3834
* - Accurate system tick for timeout and delay validation
39-
*
4035
* Expected Results:
4136
* - All mutex APIs behave according to RT-Thread specifications
4237
* - Static and dynamic mutex tests complete successfully
4338
* - Priority inversion resolved via priority inheritance
4439
* - Console/log output indicates all UTEST cases pass
45-
*/
40+
*/
4641

4742
#define __RT_IPC_SOURCE__
4843

0 commit comments

Comments
 (0)