Commit 23ff1e3f authored by Jan Kiszka's avatar Jan Kiszka

testsuite/smokey: Fix setsched /wrt lazy scheduling parameter application

As we didn't migrate to RT, we didn't test properly if lazy parameter
application actually works. Fix that, also taking into account the
related config switch.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 65a04560
......@@ -68,18 +68,24 @@ static void __check_rt_schedparams(int expected_policy, int expected_prio,
static void *thread_body(void *arg)
struct cobalt_threadstat stats;
struct sched_param param;
struct cobalt_threadstat stats;
unsigned long long msw;
thread_pid = syscall(SYS_gettid);
check_rt_schedparams(SCHED_FIFO, 1);
check_linux_schedparams(SCHED_FIFO, 1);
if (smokey_check_status(cobalt_thread_stat(thread_pid, &stats)))
pthread_exit((void *)(long)-EINVAL);
msw = stats.msw;
param.sched_priority = 2;
if (smokey_check_status(pthread_setschedparam(pthread_self(),
......@@ -88,9 +94,11 @@ static void *thread_body(void *arg)
check_rt_schedparams(SCHED_FIFO, 2);
if (smokey_check_status(cobalt_thread_stat(thread_pid, &stats)) ||
!smokey_assert(stats.msw == msw))
pthread_exit((void *)(long)-EINVAL);
check_linux_schedparams(SCHED_FIFO, 2);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment