1/*
2 * Copyright (c) 2002, Intel Corporation. All rights reserved.
3 * Created by:  julie.n.fleischer REMOVE-THIS AT intel DOT com
4 * This file is licensed under the GPL license.  For the full content
5 * of this license, see the COPYING file at the top level of this
6 * source tree.
7
8   Test adding signo to a signal set without first calling
9   sigemptyset() or sigfillset().
10   Results are undefined; however, we should definitely not see system
11   crashes or hangs or other equally harmful behavior.
12   So, if the system is able to return test results, then this test case
13   passes.
14 */
15#include <stdio.h>
16#include <signal.h>
17#include "posixtest.h"
18
19int main()
20{
21	sigset_t signalset;
22
23	if (sigaddset(&signalset, SIGALRM) == 0) {
24		if (sigismember(&signalset, SIGALRM) == 1) {
25			printf("Signal was added\n");
26			return PTS_PASS;
27		}
28		printf("Signal was not added\n");
29		return PTS_FAIL;
30	}
31
32	printf("sigaddset did not return 0\n");
33	return PTS_FAIL;
34}
35