• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) Crackerjack Project., 2007
4  * Copyright (c) Manas Kumar Nayak maknayak@in.ibm.com>
5  * Copyright (C) 2021 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com>
6  */
7 
8 /*\
9  * [Description]
10  *
11  * Tests if waitid() returns EINVAL when passed invalid options flag value.
12  */
13 
14 #include <sys/wait.h>
15 #include "tst_test.h"
16 
17 static siginfo_t *infop;
18 
run(void)19 static void run(void)
20 {
21 	TST_EXP_FAIL(waitid(P_ALL, 0, infop, WNOHANG), EINVAL);
22 }
23 
24 static struct tst_test test = {
25 	.test_all = run,
26 	.bufs = (struct tst_buffers[]) {
27 		{&infop, .size = sizeof(*infop)},
28 		{}
29 	}
30 };
31