From: Jérémie Galarneau Date: Mon, 1 Aug 2016 19:32:39 +0000 (-0400) Subject: Tests: unchecked pthread_join return value X-Git-Tag: v2.9.0-rc1~76 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9d55857158aaa320476b962fc67a9c93be8c77c3;p=lttng-tools.git Tests: unchecked pthread_join return value Reported-by Coverity Scan: CID 1360530 (#1 of 1): Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/kernel/select_poll_epoll.c b/tests/regression/kernel/select_poll_epoll.c index e0e92fd38..cb39b0819 100644 --- a/tests/regression/kernel/select_poll_epoll.c +++ b/tests/regression/kernel/select_poll_epoll.c @@ -655,7 +655,11 @@ void stress_ppoll(int *fds, int value) do_ppoll(fds, ufds); } stop_thread = 1; - pthread_join(writer, NULL); + ret = pthread_join(writer, NULL); + if (ret) { + fprintf(stderr, "[error] pthread_join\n"); + goto end; + } end: return; } @@ -773,8 +777,11 @@ void epoll_pwait_concurrent_munmap(void) } stop_thread = 1; - pthread_join(writer, NULL); - + ret = pthread_join(writer, NULL); + if (ret) { + fprintf(stderr, "[error] pthread_join\n"); + goto end_unmap; + } end_unmap: for (i = 0; i < MAX_FDS; i++) { ret = close(fds[i]);