11590Srgrimes/*
21590Srgrimes * Copyright (c) 2002, Intel Corporation. All rights reserved.
31590Srgrimes * Created by:  salwan.searty REMOVE-THIS AT intel DOT com
41590Srgrimes * This file is licensed under the GPL license.  For the full content
51590Srgrimes * of this license, see the COPYING file at the top level of this
61590Srgrimes * source tree.
71590Srgrimes
81590Srgrimes * Tests assertion 3 by filling a signal set and arbitrarily querying
91590Srgrimes * it for a SIGABRT function. Sigmember should return a 1.
101590Srgrimes*/
111590Srgrimes
121590Srgrimes#include <stdio.h>
131590Srgrimes#include <signal.h>
141590Srgrimes#include "posixtest.h"
151590Srgrimes
161590Srgrimesint main() {
171590Srgrimes
181590Srgrimes	sigset_t signalset;
191590Srgrimes
201590Srgrimes	if (sigfillset(&signalset) == -1) {
211590Srgrimes		perror("sigfillset failed -- test aborted");
221590Srgrimes		return PTS_UNRESOLVED;
231590Srgrimes	}
241590Srgrimes
251590Srgrimes	if (sigismember(&signalset, SIGABRT) != 1) {
261590Srgrimes		#ifdef DEBUG
271590Srgrimes			printf("sigismember didn't returned a 1 even though sigfillset was just called\n");
281590Srgrimes		#endif
291590Srgrimes		return PTS_FAIL;
301590Srgrimes	}
311590Srgrimes
321590Srgrimes	printf("sigismember passed\n");
331590Srgrimes	return PTS_PASS;
341590Srgrimes}
3527443Scharnier