From: Cyril H. <su...@li...> - 2011-09-07 12:06:22
|
The branch, master, has been updated via 89f4807042e59f168b10fde234a18dc5440ae5ee (commit) from 0bf1a791a39dfa48ee207bc65d3c6f746a6984dd (commit) - Log ----------------------------------------------------------------- commit 89f4807042e59f168b10fde234a18dc5440ae5ee Author: Peng Haitao <pe...@cn...> Date: Tue Sep 6 16:55:47 2011 +0800 pthread_create/10-1: correct return value if test fails This patch fixes return value always being 0 even if test fails. Using _exit(value) instead of pthread_exit();. Signed-off-by: Peng Haitao <pe...@cn...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/pthread_create/10-1.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/10-1.c index 265901f..fe0c88d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/10-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_create/10-1.c @@ -76,16 +76,16 @@ void sig_handler(int sig) if (created_thread == 1) { printf("Test FAILED: Created thread though an invalid attribute was passed to pthread_create().\n"); - pthread_exit((void*)PTS_FAIL); + _exit(PTS_FAIL); } printf("Test PASSED\n"); - pthread_exit((void*)PTS_PASS); + _exit(PTS_PASS); return; } printf("Test FAILED: Did not receive segmentation fault signal, waited 10 seconds.\n"); - pthread_exit((void*)PTS_FAIL); + _exit(PTS_FAIL); return; } @@ -124,4 +124,4 @@ int main() printf("Test FAILED.\n"); return PTS_FAIL; -} \ No newline at end of file +} hooks/post-receive -- ltp |