Skip to content

Commit a3d5e16

Browse files
jpuhlmanAlexander Kanavin
authored and
Alexander Kanavin
committed
Add option to disable timed dependant tests
The disabled tests rely on timing to pass correctly. On a virtualized system under heavy load, these tests randomly fail because they miss a timer or other timing related issues.
1 parent 8986864 commit a3d5e16

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

configure.in

+6
Original file line numberDiff line numberDiff line change
@@ -3103,6 +3103,12 @@ AC_MSG_RESULT($ipv6_result)
31033103

31043104
AC_SUBST(have_ipv6)
31053105

3106+
AC_ARG_ENABLE(timed-tests,
3107+
[ --disable-timed-tests Disable timed tests ],
3108+
[apr_has_timedtests="0"], [apr_has_timedtests="1"]
3109+
)
3110+
AC_SUBST(apr_has_timedtests)
3111+
31063112
# hstrerror is only needed if IPv6 is not enabled,
31073113
# so getaddrinfo/gai_strerror are not used.
31083114
if test $have_ipv6 = 0; then

include/apr.h.in

+1
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ extern "C" {
312312
#define APR_HAS_LARGE_FILES @aprlfs@
313313
#define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
314314
#define APR_HAS_OS_UUID @osuuid@
315+
#define APR_HAS_TIME_DEPENDANT_TESTS @apr_has_timedtests@
315316

316317
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
317318

test/testlock.c

+4
Original file line numberDiff line numberDiff line change
@@ -551,13 +551,17 @@ abts_suite *testlock(abts_suite *suite)
551551
abts_run_test(suite, threads_not_impl, NULL);
552552
#else
553553
abts_run_test(suite, test_thread_mutex, NULL);
554+
#if APR_HAS_TIME_DEPENDANT_TESTS
554555
abts_run_test(suite, test_thread_timedmutex, NULL);
556+
#endif
555557
abts_run_test(suite, test_thread_nestedmutex, NULL);
556558
abts_run_test(suite, test_thread_unnestedmutex, NULL);
557559
abts_run_test(suite, test_thread_rwlock, NULL);
558560
abts_run_test(suite, test_cond, NULL);
559561
abts_run_test(suite, test_timeoutcond, NULL);
562+
#if APR_HAS_TIME_DEPENDANT_TESTS
560563
abts_run_test(suite, test_timeoutmutex, NULL);
564+
#endif
561565
#ifdef WIN32
562566
abts_run_test(suite, test_win32_abandoned_mutex, NULL);
563567
#endif

0 commit comments

Comments
 (0)