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

Cyril Hrubis chrubis@suse.cz
Tue Dec 21 17:06:51 CET 2021


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


More information about the ltp mailing list