[LTP] [PATCH] syscalls/sched_rr_get_interval: Validate the timeslice

Yang Xu xuyang2018.jy@cn.fujitsu.com
Fri Jul 3 09:43:16 CEST 2020


Hi Viresh

Can we add a linux tag for this case(also a regression test for the before kernel patch).

> Validate the timespec returned by sched_rr_get_interval() against the
> value read from /proc/sys/kernel/sched_rr_timeslice_ms.
>
> 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 = {


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200703/501abbfb/attachment.htm>


More information about the ltp mailing list