• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
3 
4 #include "libsigwait.h"
5 
my_sigtimedwait(const sigset_t * set,siginfo_t * info,void * timeout)6 static int my_sigtimedwait(const sigset_t * set, siginfo_t * info,
7 			   void *timeout)
8 {
9 	return sigtimedwait(set, info, timeout);
10 }
11 
12 struct sigwait_test_desc tests[] = {
13 	{ test_empty_set, SIGUSR1},
14 	{ test_unmasked_matching, SIGUSR1},
15 	{ test_masked_matching, SIGUSR1},
16 	{ test_unmasked_matching_noinfo, SIGUSR1},
17 	{ test_masked_matching_noinfo, SIGUSR1},
18 	{ test_bad_address, SIGUSR1},
19 	{ test_bad_address2, SIGUSR1},
20 	{ test_bad_address3, SIGUSR1},
21 	{ test_timeout, 0},
22 };
23 
run(unsigned int i)24 static void run(unsigned int i)
25 {
26 	struct sigwait_test_desc *tc = &tests[i];
27 
28 	tc->tf(my_sigtimedwait, tc->signo, TST_LIBC_TIMESPEC);
29 }
30 
31 static struct tst_test test = {
32 	.test= run,
33 	.tcnt = ARRAY_SIZE(tests),
34 	.setup = sigwait_setup,
35 	.forks_child = 1,
36 };
37