diff options
| author | Tm-C-mT <[email protected]> | 2025-11-20 10:49:30 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-11-26 22:51:25 +0800 |
| commit | ea37d4c2c931c3efb6da8b7cc68854fcf93ddfd0 (patch) | |
| tree | ab810e7782ded5b878067f0258e0da891e245e36 /src | |
| parent | 5706c5ef4db7482168bb05db0c69fc648ae7950e (diff) | |
[docs][utest]:Add comments for smp_affinity_pri1
Add comments for smp_affinity_pri1
Signed-off-by: Mengchen Teng <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/utest/smp/smp_affinity_pri1_tc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/utest/smp/smp_affinity_pri1_tc.c b/src/utest/smp/smp_affinity_pri1_tc.c index c1a2164b8a..5f3c55804c 100644 --- a/src/utest/smp/smp_affinity_pri1_tc.c +++ b/src/utest/smp/smp_affinity_pri1_tc.c @@ -18,6 +18,30 @@ * for the system's highest and the thread entry function does not let out the CPU control, run the specified * number of times in thread 0 to create a high-priority not bound to the core of the thread, the thread will * be preempted by the core 0 is running on the thread! + * + * Test Case Name: [smp_affinity_pri1] + * + * Test Objectives: + * - Verify that threads with low-priority bound 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 the lowest priority (LOW_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 executes list_thread() and creates a medium-priority (THIGH_PRIORITY) thread Tn, whose entry function + * - is thread_temp_entry. Tn is automatically destroyed after executing list_thread(). + * + * Verification Metrics: + * - Output message: [I/utest] [ PASSED ] [ result ] testcase (core.smp_affinity_pri1) + * + * Dependencies: + * - Enable RT_USING_SMP, set RT_THREAD_PRIORITY_MAX = 256. + * + * Expected Results: + * - You will see the information printed by list_thread() twice on the terminal. For the first time, you will see that T0 is + * - running on core 0, and T1~T(RT_CPUS_NR-1) are running on their respective cores. For the second time, you will see that Tn + * - is running on core 0, while T0 is in the ready state. Subsequently, the PASS message will be printed. */ /* Number of thread runs */ |
