diff options
| author | Tm-C-mT <[email protected]> | 2025-11-20 11:28:04 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-11-26 22:51:25 +0800 |
| commit | cafd9c6dfea305eb664d1d94c5713d6a5f53ad47 (patch) | |
| tree | f390a5869b5e6740b361cbaa4229e9b27ec9e3d3 /src | |
| parent | ea37d4c2c931c3efb6da8b7cc68854fcf93ddfd0 (diff) | |
[docs][utest]:Add comments for smp_affinity_pri2
Add comments for smp_affinity_pri2
Signed-off-by: Mengchen Teng <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/utest/smp/smp_affinity_pri2_tc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/utest/smp/smp_affinity_pri2_tc.c b/src/utest/smp/smp_affinity_pri2_tc.c index 1d8de870b2..5261fe7e85 100644 --- a/src/utest/smp/smp_affinity_pri2_tc.c +++ b/src/utest/smp/smp_affinity_pri2_tc.c @@ -18,6 +18,29 @@ * threads for the system's highest and the thread entry function does not let out the CPU control, run the * specified number of times after the creation of thread 0 in thread 0, a low-priority bound to the core 0, * the thread will not preempt the core 0 is running on threads + * + * Test Case Name: [smp_affinity_pri2] + * + * Test Objectives: + * - Verify that threads with low-priority unbound cores do not preempt high-priority threads. + * + * Test Scenarios: + * - RT_CPUS_NR threads (T0~T(RT_CPUS_NR-1)) are created, with each thread bound to its respective core. Among them, + * - the thread on core 0 has a medium priority (THIGH_PRIORITY), while the other threads have the highest priority (THREAD_PRIORITY). + * - All threads share a common entry function thread_entry. In thread_entry, only the threads running on non-core-0 cores + * - execute an infinite loop (i.e., they do not release core ownership). After running for a certain period of time, + * - the thread on core 0 checks whether run_flag equals 0 after creating a low-priority (LOW_PRIORITY) thread Tn. The entry + * - function of Tn is thread_temp_entry, and Tn will be destroyed after setting run_flag = 1. + * + * Verification Metrics: + * - Output message: [I/utest] [ PASSED ] [ result ] testcase (core.smp_affinity_pri2) + * + * Dependencies: + * - Enable RT_USING_SMP, set RT_THREAD_PRIORITY_MAX = 256. + * + * Expected Results: + * - After T0 creates Tn, no scheduling occurs. T0 immediately checks whether run_flag is not equal to 1, and if this condition + * - is true, it indicates that Tn has failed to preempt T0. */ /* Number of thread runs */ |
