Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: sched: Add more core schedule prctl calls

The core sched kselftest makes prctl calls only with correct
parameters. This patch will extend this test with more core
schedule prctl calls with wrong parameters to increase code
coverage.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Ivan Orlov and committed by
Shuah Khan
14f4cc63 c83f320e

+6
+6
tools/testing/selftests/sched/cs_prctl_test.c
··· 334 334 validate(get_cs_cookie(pid) != 0); 335 335 validate(get_cs_cookie(pid) == get_cs_cookie(procs[pidx].thr_tids[0])); 336 336 337 + validate(_prctl(PR_SCHED_CORE, PR_SCHED_CORE_MAX, 0, PIDTYPE_PGID, 0) < 0 338 + && errno == EINVAL); 339 + 340 + validate(_prctl(PR_SCHED_CORE, PR_SCHED_CORE_SHARE_TO, 0, PIDTYPE_PGID, 1) < 0 341 + && errno == EINVAL); 342 + 337 343 if (errors) { 338 344 printf("TESTS FAILED. errors: %d\n", errors); 339 345 res = 10;