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 2012/04/18 14:00:21 UTC
svn commit: r1327462 - in /subversion/trunk/subversion/tests/libsvn_subr:
named_atomic-test-common.h named_atomic-test.c
Author: stefan2
Date: Wed Apr 18 12:00:21 2012
New Revision: 1327462
URL: http://svn.apache.org/viewvc?rev=1327462&view=rev
Log:
Improve error reporting in named atomic tests and lower the calibration
threshold as some build bots fail to reach 200 iterations/s.
* subversion/tests/libsvn_subr/named_atomic-test-common.h
(check_watchdog): if deadline is reached, log progress as part of the error
* subversion/tests/libsvn_subr/named_atomic-test.c
(run_procs): aggregate errors over all sub-processes
(calibrate_iterations): start with 100 iterations since some build bots
seem to take more than 5s with an initial value of 1000.
Modified:
subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h
subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c
Modified: subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h?rev=1327462&r1=1327461&r2=1327462&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h Wed Apr 18 12:00:21 2012
@@ -91,9 +91,10 @@ check_watchdog(watchdog_t *watchdog, svn
{
watchdog->call_count = 100;
if (apr_time_now() > watchdog->deadline)
- return svn_error_create(SVN_ERR_TEST_FAILED,
+ return svn_error_createf(SVN_ERR_TEST_FAILED,
0,
- "Deadline has passed.");
+ "Deadline has passed at iteration %d/%d",
+ (int)counter, watchdog->iterations);
}
/* no problem so far */
Modified: subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c?rev=1327462&r1=1327461&r2=1327462&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c Wed Apr 18 12:00:21 2012
@@ -364,7 +364,10 @@ run_procs(apr_pool_t *pool, const char *
const char *cmd = apr_psprintf(pool,
"named_atomic-test-proc %d %d %d",
i, count, iterations);
- SVN_ERR(svn_io_wait_for_cmd(&process[i], cmd, NULL, NULL, pool));
+ error = svn_error_compose_create(error,
+ svn_io_wait_for_cmd(&process[i],
+ cmd, NULL, NULL,
+ pool));
}
return error;
@@ -382,7 +385,7 @@ calibrate_iterations(apr_pool_t *pool, i
/* increase iterations until we pass the 100ms mark */
- for (calib_iterations = 1000; taken < 100000.0; calib_iterations *= 2)
+ for (calib_iterations = 100; taken < 100000.0; calib_iterations *= 2)
{
SVN_ERR(init_concurrency_test_shm(pool, count));