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

Viresh Kumar
2020-07-03T07:38:13Z

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 = {
--
2.25.0.rc1.19.g042ed3e048af