[LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies

Petr Vorel pvorel@suse.cz
Mon Jan 24 15:21:26 CET 2022


Hi Cyril,

> Hi!
> > diff --git a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
> > index a1c54efd0e..0d01317033 100644
> > --- a/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
> > +++ b/testcases/kernel/syscalls/sched_get_priority_max/sched_get_priority_max01.c
> > @@ -13,6 +13,8 @@
> >   * compare them with expected value.
> >   */

> > +#define _GNU_SOURCE

> I supposed that we need this for SCHED_DEADLINE right? What about
> alternative libc implementations, does they define SCHED_DEADLINE as
> well? Do we need a fallback?

Sorry for the delay (I did write a reply, but probably forget to sent).
musl and glibc support all of them, but uclibc-ng doesn't have SCHED_DEADLINE.
(and SCHED_RESET_ON_FORK). I'll send v2 with SCHED_DEADLINE fallback.

I guess SCHED_RESET_ON_FORK would deserve it's own test (man sched(7):
when set, children created by fork(2) do not inherit privileged scheduling
policies).

Kind regards,
Petr


More information about the ltp mailing list