1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved. 4 * Copyright (c) 2021 sujiaxun <[email protected]> 5 */ 6 7 /*\ 8 * [Description] 9 * 10 * Verify that given an invalid scheduling policy, sched_get_priority_max(2) 11 * returns -1 with errno EINVAL. 12 */ 13 14 #include <errno.h> 15 #include <sched.h> 16 #include "tst_test.h" 17 #include "lapi/syscalls.h" 18 19 #define SCHED_INVALID 1000 20 verif_sched_get_priority_max02(void)21static void verif_sched_get_priority_max02(void) 22 { 23 TST_EXP_FAIL(tst_syscall(__NR_sched_get_priority_max, SCHED_INVALID), EINVAL); 24 } 25 26 static struct tst_test test = { 27 .test_all = verif_sched_get_priority_max02, 28 }; 29