diff mbox series

[v2,4/4] sched_get_priority_max01: Add missing policies

Message ID 20220125144043.31798-5-pvorel@suse.cz
State Accepted
Headers show
Series sched_{g,s}etattr01: Add missing policies | expand

Commit Message

Petr Vorel Jan. 25, 2022, 2:40 p.m. UTC
+ improve doc wording and update copyright.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
changes v1->v2:
* code is the same, only copyright and doc updated

 .../sched_get_priority_max01.c                      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Cyril Hrubis Jan. 25, 2022, 3:26 p.m. UTC | #1
Hi!
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

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 f6fe1add9c..b9a58a46a4 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
@@ -2,6 +2,7 @@ 
 /*
  * Copyright (c) Wipro Technologies Ltd, 2002.  All Rights Reserved.
  * Copyright (c) 2021 sujiaxun <sujiaxun@uniontech.com>
+ * Copyright (c) Linux Test Project, 2009-2022
  */
 
 /*\
@@ -10,9 +11,11 @@ 
  * Basic test for the sched_get_priority_max(2) system call.
  *
  * Obtain different maximum priority for different schedulling policies and
- * compare them with expected value.
+ * compare them with the expected value.
  */
 
+#define _GNU_SOURCE
+
 #include <sched.h>
 #include "tst_test.h"
 #include "lapi/syscalls.h"
@@ -24,14 +27,16 @@  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)
 {
-
 	struct test_case *tc = &tcases[nr];
 
 	TST_EXP_VAL(tst_syscall(__NR_sched_get_priority_max, tc->policy),