summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Puhlman <jpuhlman@mvista.com>2020-03-26 13:14:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-29 12:05:31 +0100
commitab0dbfc034a596a9171ce00f34467bc42534f00a (patch)
tree6b6224f69adc0edad480b355ed15d92d0a97efca
parentad366e738358455921f93b59e7ab3808747d7700 (diff)
downloadpoky-ab0dbfc034a596a9171ce00f34467bc42534f00a.tar.gz
apr: add option for disabling time dependant tests
[YOCTO #13839] (From OE-Core rev: ff617d478cb3213deb23cf0124c04beab4d4ecc8) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch69
-rw-r--r--meta/recipes-support/apr/apr_1.7.0.bb2
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
new file mode 100644
index 0000000000..abff4e9331
--- /dev/null
+++ b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch
@@ -0,0 +1,69 @@
1From 2bbe20b4f69e84e7a18bc79d382486953f479328 Mon Sep 17 00:00:00 2001
2From: Jeremy Puhlman <jpuhlman@mvista.com>
3Date: Thu, 26 Mar 2020 18:30:36 +0000
4Subject: [PATCH] Add option to disable timed dependant tests
5
6The disabled tests rely on timing to pass correctly. On a virtualized
7system under heavy load, these tests randomly fail because they miss
8a timer or other timing related issues.
9
10Upstream-Status: Pending
11Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
12---
13 configure.in | 6 ++++++
14 include/apr.h.in | 1 +
15 test/testlock.c | 4 ++--
16 3 files changed, 9 insertions(+), 2 deletions(-)
17
18diff --git a/configure.in b/configure.in
19index d9f32d6..f0c5661 100644
20--- a/configure.in
21+++ b/configure.in
22@@ -2886,6 +2886,12 @@ AC_ARG_ENABLE(timedlocks,
23 )
24 AC_SUBST(apr_has_timedlocks)
25
26+AC_ARG_ENABLE(timed-tests,
27+ [ --disable-timed-tests Disable timed tests ],
28+ [apr_has_timedtests="0"], [apr_has_timedtests="1"]
29+)
30+AC_SUBST(apr_has_timedtests)
31+
32 # hstrerror is only needed if IPv6 is not enabled,
33 # so getaddrinfo/gai_strerror are not used.
34 if test $have_ipv6 = 0; then
35diff --git a/include/apr.h.in b/include/apr.h.in
36index ee99def..c46a5f4 100644
37--- a/include/apr.h.in
38+++ b/include/apr.h.in
39@@ -298,6 +298,7 @@ extern "C" {
40 #define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
41 #define APR_HAS_OS_UUID @osuuid@
42 #define APR_HAS_TIMEDLOCKS @apr_has_timedlocks@
43+#define APR_HAVE_TIME_DEPENDANT_TESTS @apr_has_timedtests@
44
45 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
46
47diff --git a/test/testlock.c b/test/testlock.c
48index a43f477..6233d0b 100644
49--- a/test/testlock.c
50+++ b/test/testlock.c
51@@ -396,13 +396,13 @@ abts_suite *testlock(abts_suite *suite)
52 abts_run_test(suite, threads_not_impl, NULL);
53 #else
54 abts_run_test(suite, test_thread_mutex, NULL);
55-#if APR_HAS_TIMEDLOCKS
56+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
57 abts_run_test(suite, test_thread_timedmutex, NULL);
58 #endif
59 abts_run_test(suite, test_thread_rwlock, NULL);
60 abts_run_test(suite, test_cond, NULL);
61 abts_run_test(suite, test_timeoutcond, NULL);
62-#if APR_HAS_TIMEDLOCKS
63+#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS
64 abts_run_test(suite, test_timeoutmutex, NULL);
65 #endif
66 #endif
67--
682.23.0
69
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.0.bb
index 8a9b780593..7073af8c98 100644
--- a/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/meta/recipes-support/apr/apr_1.7.0.bb
@@ -18,6 +18,7 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
18 file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \ 18 file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
19 file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \ 19 file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
20 file://libtoolize_check.patch \ 20 file://libtoolize_check.patch \
21 file://0001-Add-option-to-disable-timed-dependant-tests.patch \
21 " 22 "
22 23
23SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" 24SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7"
@@ -39,6 +40,7 @@ CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
39 40
40PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" 41PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
41PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," 42PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
43PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests,"
42 44
43do_configure_prepend() { 45do_configure_prepend() {
44 # Avoid absolute paths for grep since it causes failures 46 # Avoid absolute paths for grep since it causes failures