As pointed out by Cheng Shun Xia one of open posix conformace tests is testing
return value from sigset(SIGCHLD, SIG_HOLD) and expect this value to be
SIG_HOLD, however this is true only if SIGCHLD is already blocked so we must
ensure that. Patch is attached.

Signed-off-by: Cyril Hrubis chrubis@suse.cz
Signed-off-by: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
index f344b19..22b1f40 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
@@ -15,12 +15,22 @@
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
+#include <string.h>
 #include "posixtest.h"
 
-int main()
+int main(void)
 {
+	sigset_t st;
+	sigemptyset(&st);
+	sigaddset(&st, SIGCHLD);
 
-        if (sigset(SIGCHLD,SIG_HOLD) != SIG_HOLD) {
+	if (sigprocmask(SIG_BLOCK, &st, NULL) < 0) {
+		printf("Test FAILED: sigprocmask(): %s\n", strerror(errno));
+		return PTS_FAIL;
+	}
+
+        if (sigset(SIGCHLD, SIG_HOLD) != SIG_HOLD) {
 		printf("Test FAILED: sigset() didn't return SIG_HOLD\n");
 		return PTS_FAIL;
 	}