[LTP] [PATCH v2 13/16] syscalls/sched_setscheduler02: convert to new API
Cyril Hrubis
chrubis@suse.cz
Mon Aug 9 14:21:39 CEST 2021
Hi!
> #define SCHED_INVALID 99
> #define INVALID_PID 999999
I guess that we should remove these two unused macros as well.
> + if (!pid) {
> + struct sched_param p = { .sched_priority = 1 };
> +
> + SAFE_SETEUID(nobody_uid);
> + TST_EXP_FAIL(tv->sched_setscheduler(0, SCHED_FIFO, &p), EPERM,
> + "sched_setscheduler(0, SCHED_FIFO, %d)",
> + p.sched_priority);
> + SAFE_SETEUID(0);
And we do not have to reset the UID before we call exit(0)
> + exit(0);
> + }
> + tst_reap_children();
> }
Other than that:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list