You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/11/30 11:02:29 UTC

svn commit: r1546712 - /subversion/trunk/subversion/tests/svn_test_main.c

Author: stefan2
Date: Sat Nov 30 10:02:29 2013
New Revision: 1546712

URL: http://svn.apache.org/r1546712
Log:
Fix the APR_INCOMPLETE failures in our test suite when joining the
test threads and don't show bogus return codes upon failure.

* subversion/tests/svn_test_main.c
  (test_thread): Explicitly end the test thread.  This seems to be the
                 Right Thing to do for non-detached threads.
  (do_tests_concurrently): Make sure the return value has been initialized
                           before checking it.

Modified:
    subversion/trunk/subversion/tests/svn_test_main.c

Modified: subversion/trunk/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1546712&r1=1546711&r2=1546712&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Sat Nov 30 10:02:29 2013
@@ -442,7 +442,7 @@ typedef struct test_params_t
    catch segfaults.  All parameters are given as a test_params_t in DATA.
  */
 static void * APR_THREAD_FUNC
-test_thread(apr_thread_t *tid, void *data)
+test_thread(apr_thread_t *thread, void *data)
 {
   svn_boolean_t skip, xfail, wimp;
   svn_error_t *err = NULL;
@@ -486,6 +486,9 @@ test_thread(apr_thread_t *tid, void *dat
   /* release all test memory */
   svn_pool_destroy(pool);
 
+  /* End thread explicitly to prevent APR_INCOMPLETE return codes in
+     apr_thread_join(). */
+  apr_thread_exit(thread, 0);
   return NULL;
 }
 
@@ -538,7 +541,7 @@ do_tests_concurrently(const char *progna
   /* Wait for all tasks (tests) to complete. */
   for (i = 0; i < max_threads; ++i)
     {
-      apr_status_t result;
+      apr_status_t result = 0;
       CHECK_STATUS(apr_thread_join(&result, threads[i]),
                    "Waiting for test thread to finish failed.");
       CHECK_STATUS(result,