tests/kernel/threads_apis: Add case for CPU_MASK_PIN_ONLY
Add testing for the PIN_ONLY API variant (which has a separate run queue per CPU). Predicate on SMP systems only, to keep needless duplicate testing to a minimum. Note that one of the cases in this test exercises an "all cpus" option for the cpu mask, which is illegal when CONFIG_SCHED_CPU_MASK_PIN_ONLY is set. Skip. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
b11e796c36
commit
0f20abda8d
2 changed files with 13 additions and 0 deletions
|
@ -42,6 +42,13 @@ void test_threads_cpu_mask(void)
|
||||||
zassert_true(ret == -EINVAL, "");
|
zassert_true(ret == -EINVAL, "");
|
||||||
|
|
||||||
for (pass = 0; pass < 4; pass++) {
|
for (pass = 0; pass < 4; pass++) {
|
||||||
|
if (IS_ENABLED(CONFIG_SCHED_CPU_MASK_PIN_ONLY) && pass == 1) {
|
||||||
|
/* Pass 1 enables more than one CPU in the
|
||||||
|
* mask, which is illegal when PIN_ONLY
|
||||||
|
*/
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
child_has_run = false;
|
child_has_run = false;
|
||||||
|
|
||||||
/* Create a thread at a higher priority, don't start
|
/* Create a thread at a higher priority, don't start
|
||||||
|
|
|
@ -2,3 +2,9 @@ tests:
|
||||||
kernel.threads.apis:
|
kernel.threads.apis:
|
||||||
tags: kernel threads userspace ignore_faults
|
tags: kernel threads userspace ignore_faults
|
||||||
min_flash: 34
|
min_flash: 34
|
||||||
|
kernel.threads.apis.pinonly:
|
||||||
|
tags: kernel threads userspace ignore_faults
|
||||||
|
min_flash: 34
|
||||||
|
filter: CONFIG_SMP
|
||||||
|
extra_configs:
|
||||||
|
- CONFIG_SCHED_CPU_MASK_PIN_ONLY=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue