@@ -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),
+ 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(-)