[LTP] [PATCH] syscalls/sched_rr_get_interval: Validate the timeslice
Cyril Hrubis
chrubis@suse.cz
Fri Jul 3 16:08:09 CEST 2020
Hi!
> Validate the timespec returned by sched_rr_get_interval() against the
> value read from /proc/sys/kernel/sched_rr_timeslice_ms.
Looking at centos 6, the older distribution we support, the kernel there
is based on 4.15 so we do not have to bother with check if the file is
present. But we should really add a tag for the kernel commit that fixed
the issue.
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> .../syscalls/sched_rr_get_interval/sched_rr_get_interval01.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> index 31d7b5d56a52..f358c91ac505 100644
> --- a/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> +++ b/testcases/kernel/syscalls/sched_rr_get_interval/sched_rr_get_interval01.c
> @@ -62,6 +62,7 @@ static void run(void)
> tst_ts_get_sec(tp), tst_ts_get_nsec(tp));
> }
>
> + TST_ASSERT_INT("/proc/sys/kernel/sched_rr_timeslice_ms", tst_ts_to_ms(tp));
> }
>
> static struct tst_test test = {
> --
> 2.25.0.rc1.19.g042ed3e048af
>
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list