|
17 | 17 | * @note Create multiple threads untied core threads, run them for a while on each core to see |
18 | 18 | * if the threads are automatically distributed evenly, run for a while to output the threads |
19 | 19 | * running on each core. |
| 20 | + * |
| 21 | + * Test Case Name: [smp_assigned_idle_cores] |
| 22 | + * |
| 23 | + * Test Objectives: |
| 24 | + * - Test whether ready threads unbound to cores can be automatically allocated |
| 25 | + * - to idle cores under the SMP architecture. |
| 26 | + * |
| 27 | + * Test Scenarios: |
| 28 | + * - Under the SMP architecture, each core spends most of its time running the |
| 29 | + * - idle thread after the system starts. At this point, create RT_CPUS_NR-1 cyclic |
| 30 | + * - tasks and observe whether these tasks can be evenly distributed across all |
| 31 | + * - cores for execution. Since the thread running the utest occupies one core, it |
| 32 | + * - is only necessary to observe whether the remaining (RT_CPUS_NR - 1) cores can |
| 33 | + * - be allocated the newly created threads and execute them. |
| 34 | + * |
| 35 | + * Verification Metrics: |
| 36 | + * - After running this test case, it is necessary to observe the printed thread |
| 37 | + * - list, where all threads created with names from T0 to T(RT_CPUS_NR-2) must |
| 38 | + * - be in the running state. RT_CPUS_NR must be greater than or equal to 2. |
| 39 | + * |
| 40 | + * Dependencies: |
| 41 | + * - RT_USING_SMP needs to be enabled. |
| 42 | + * |
| 43 | + * Expected Results: |
| 44 | + * - Print the thread list on the terminal, and observe that T0 to T(RT_CPUS_NR-2) |
| 45 | + * - are all in the running state, with the output "[ PASSED ] [ result ] testcase |
| 46 | + * - (core.smp_assigned_idle_cores)". |
20 | 47 | */ |
21 | 48 |
|
22 | 49 | #define THREAD_STACK_SIZE UTEST_THR_STACK_SIZE |
|
0 commit comments