sched_rr_get_interval: run tests under SCHED_RR policy
Man page says:
The specified process should be running under the SCHED_RR
scheduling policy.
sched_rr_get_interval_1-1 can rarely fail if run as
SCHED_OTHER, because time quantum calculated/returned by
get_rr_interval_fair() can change between two calls.
For example it depends on number of running tasks on runq.
This patch sets sched policy to SCHED_RR.
See also:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_08_04_01
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
3 files changed