|
11 | 11 |
|
12 | 12 | /** |
13 | 13 | * Test Case Name: RT-Thread Mutex Functional and Scheduling Validation |
14 | | - * |
15 | 14 | * Test Objectives: |
16 | 15 | * - Verify correctness of static and dynamic mutex operations |
17 | 16 | * - Validate priority inheritance, recursive locking, timeout handling, and error cases |
18 | 17 | * - Test core mutex APIs: rt_mutex_init/detach, rt_mutex_create/delete, |
19 | 18 | * rt_mutex_take/trytake/release, and related thread scheduling functions |
20 | | - * |
21 | 19 | * Test Scenarios: |
22 | 20 | * - Mutex acquisition under contention with multi-thread scheduling |
23 | 21 | * - Try-take on locked mutex, timeout-based take, recursive take sequence |
24 | 22 | * - Priority inheritance when high-priority threads are blocked by lower-priority holders |
25 | 23 | * - Behavior differences between static and dynamic mutexes |
26 | 24 | * - Mutex release error handling, invalid release, and cleanup |
27 | | - * |
28 | 25 | * Verification Metrics: |
29 | 26 | * - Correct return codes for all mutex operations (RT_EOK, timeouts, error states) |
30 | 27 | * - Proper priority inheritance and restoration during contention |
31 | 28 | * - Expected thread wake-up and state transition behavior |
32 | 29 | * - Successful thread synchronization via _sync_flag |
33 | | - * |
34 | 30 | * Dependencies: |
35 | 31 | * - RT-Thread kernel with IPC and mutex support enabled |
36 | 32 | * - Heap availability when testing dynamic mutex creation |
37 | 33 | * - Scheduler operating normally with multi-thread preemption |
38 | 34 | * - Accurate system tick for timeout and delay validation |
39 | | - * |
40 | 35 | * Expected Results: |
41 | 36 | * - All mutex APIs behave according to RT-Thread specifications |
42 | 37 | * - Static and dynamic mutex tests complete successfully |
43 | 38 | * - Priority inversion resolved via priority inheritance |
44 | 39 | * - Console/log output indicates all UTEST cases pass |
45 | | - */ |
| 40 | + */ |
46 | 41 |
|
47 | 42 | #define __RT_IPC_SOURCE__ |
48 | 43 |
|
|
0 commit comments