* [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies
@ 2021-12-20 20:18 Petr Vorel
2021-12-21 16:06 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2021-12-20 20:18 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.../sched_get_priority_max/sched_get_priority_max01.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
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
+
#include <sched.h>
#include "lapi/syscalls.h"
#include "tst_test.h"
@@ -24,9 +26,12 @@ static struct test_case {
int policy;
int retval;
} tcases[] = {
- {POLICY_DESC(SCHED_OTHER), 0},
+ {POLICY_DESC(SCHED_BATCH), 0},
+ {POLICY_DESC(SCHED_DEADLINE), 0},
{POLICY_DESC(SCHED_FIFO), 99},
- {POLICY_DESC(SCHED_RR), 99}
+ {POLICY_DESC(SCHED_IDLE), 0},
+ {POLICY_DESC(SCHED_OTHER), 0},
+ {POLICY_DESC(SCHED_RR), 99},
};
static void run_test(unsigned int nr)
--
2.34.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies
2021-12-20 20:18 [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies Petr Vorel
@ 2021-12-21 16:06 ` Cyril Hrubis
2022-01-24 14:21 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2021-12-21 16:06 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
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?
> #include <sched.h>
> #include "lapi/syscalls.h"
> #include "tst_test.h"
> @@ -24,9 +26,12 @@ static struct test_case {
> int policy;
> int retval;
> } tcases[] = {
> - {POLICY_DESC(SCHED_OTHER), 0},
> + {POLICY_DESC(SCHED_BATCH), 0},
> + {POLICY_DESC(SCHED_DEADLINE), 0},
> {POLICY_DESC(SCHED_FIFO), 99},
> - {POLICY_DESC(SCHED_RR), 99}
> + {POLICY_DESC(SCHED_IDLE), 0},
> + {POLICY_DESC(SCHED_OTHER), 0},
> + {POLICY_DESC(SCHED_RR), 99},
> };
>
> static void run_test(unsigned int nr)
> --
> 2.34.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies
2021-12-21 16:06 ` Cyril Hrubis
@ 2022-01-24 14:21 ` Petr Vorel
2022-01-25 10:50 ` Cyril Hrubis
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2022-01-24 14:21 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies
2022-01-24 14:21 ` Petr Vorel
@ 2022-01-25 10:50 ` Cyril Hrubis
2022-01-25 11:20 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2022-01-25 10:50 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> > 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.
Sounds good.
> 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).
Yes please. Either write the test or at least create a github issue.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies
2022-01-25 10:50 ` Cyril Hrubis
@ 2022-01-25 11:20 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2022-01-25 11:20 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
...
> > 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).
> Yes please. Either write the test or at least create a github issue.
https://github.com/linux-test-project/ltp/issues/905
Marked as easyhack and wait some time to let new comers to take it before
implementing it myself.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-25 11:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 20:18 [LTP] [PATCH 1/1] sched_get_priority_max01: Add more policies Petr Vorel
2021-12-21 16:06 ` Cyril Hrubis
2022-01-24 14:21 ` Petr Vorel
2022-01-25 10:50 ` Cyril Hrubis
2022-01-25 11:20 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.