summaryrefslogtreecommitdiffhomepage
path: root/src/test/nxt_unit_app_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/nxt_unit_app_test.c')
-rw-r--r--src/test/nxt_unit_app_test.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/test/nxt_unit_app_test.c b/src/test/nxt_unit_app_test.c
index 5b2521e8..b6dd13d2 100644
--- a/src/test/nxt_unit_app_test.c
+++ b/src/test/nxt_unit_app_test.c
@@ -72,7 +72,13 @@ main(int argc, char **argv)
for (i = 0; i < thread_count - 1; i++) {
err = pthread_join(threads[i], NULL);
- nxt_unit_debug(ctx, "join thread #%d: %d", i, err);
+ if (nxt_fast_path(err == 0)) {
+ nxt_unit_debug(ctx, "join thread #%d", i);
+
+ } else {
+ nxt_unit_alert(ctx, "pthread_join(#%d) failed: %s (%d)",
+ i, strerror(err), err);
+ }
}
nxt_unit_free(ctx, threads);
@@ -132,7 +138,7 @@ worker(void *main_ctx)
nxt_unit_done(ctx);
- return NULL;
+ return (void *) (intptr_t) rc;
}