1// SPDX-License-Identifier: GPL-2.0-or-later
2/* Copyright (c) Jiri Palecek<jpalecek@web.de>, 2009 */
3
4#include "libsigwait.h"
5
6static int my_sigwaitinfo(const sigset_t * set, siginfo_t * info,
7			  void *timeout LTP_ATTRIBUTE_UNUSED)
8{
9	return sigwaitinfo(set, info);
10}
11
12struct 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};
21
22static void run(unsigned int i)
23{
24	struct sigwait_test_desc *tc = &tests[i];
25
26	tc->tf(my_sigwaitinfo, tc->signo, TST_LIBC_TIMESPEC);
27}
28
29static struct tst_test test = {
30	.test= run,
31	.tcnt = ARRAY_SIZE(tests),
32	.setup = sigwait_setup,
33	.forks_child = 1,
34};
35