From: Rishi k. K R. <ris...@li...> - 2010-03-22 06:37:56
|
The branch, next, has been updated via 95a376d4e50acd0c90bf749060a1974338a082a9 (commit) from 6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc (commit) - Log ----------------------------------------------------------------- commit 95a376d4e50acd0c90bf749060a1974338a082a9 Author: Rishikesh K Rajak <ris...@li...> Date: Mon Mar 22 12:07:05 2010 +0530 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 ch...@su... Signed-off-by: Rishikesh K Rajak <ris...@li...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/sigset/8-1.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) 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; } hooks/post-receive -- ltp |