From: Cyril H. <su...@li...> - 2013-04-19 10:22:25
|
The branch, master, has been updated via 2f474a8158d13b339bf9bc7257c475b17031761e (commit) from 768637838d3f05888a49d1f716971443d69fe8e2 (commit) - Log ----------------------------------------------------------------- commit 2f474a8158d13b339bf9bc7257c475b17031761e Author: Jan Stancek <jst...@re...> Date: Fri Apr 19 11:49:47 2013 +0200 syscalls/write05: fix SIGPIPE check WIFSIGNALED(status) returns true if the child process was terminated by a signal. WTERMSIG(status) returns the number of the signal that caused the child process to terminate. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/write/write05.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/write/write05.c b/testcases/kernel/syscalls/write/write05.c index 699bd11..5394bbd 100644 --- a/testcases/kernel/syscalls/write/write05.c +++ b/testcases/kernel/syscalls/write/write05.c @@ -162,7 +162,8 @@ int main(int argc, char **argv) tst_resm(TFAIL, "Fork failed"); } wait(&status); - if (WIFSIGNALED(status) == SIGPIPE) { + if (WIFSIGNALED(status) && + WTERMSIG(status) == SIGPIPE) { tst_resm(TFAIL, "child set SIGPIPE in exit"); } else if (WEXITSTATUS(status) != 0) { TEST_ERROR_LOG(WEXITSTATUS(status)); hooks/post-receive -- ltp |