[LTP] [PATCH v2 3/4] sched_get_priority_min01: Add missing policies
Petr Vorel
pvorel@suse.cz
Tue Jan 25 15:40:42 CET 2022
+ improve doc wording and update copyright.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2
.../sched_get_priority_min01.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
index cebd08d3f9..e7ab761249 100644
--- a/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.c
+++ b/testcases/kernel/syscalls/sched_get_priority_min/sched_get_priority_min01.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
*/
/*\
@@ -9,11 +10,12 @@
*
* Basic test for the sched_get_priority_min(2) system call.
*
- * Obtain different minimum priority scheduling strategies and
+ * Obtain different minimum priority for different schedulling policies and
* compare them with the expected value.
*/
-#include <errno.h>
+#define _GNU_SOURCE
+
#include <sched.h>
#include "tst_test.h"
#include "lapi/syscalls.h"
@@ -25,9 +27,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), 1},
- {POLICY_DESC(SCHED_RR), 1}
+ {POLICY_DESC(SCHED_IDLE), 0},
+ {POLICY_DESC(SCHED_OTHER), 0},
+ {POLICY_DESC(SCHED_RR), 1},
};
static void run_test(unsigned int nr)
--
2.34.1
More information about the ltp
mailing list