summaryrefslogtreecommitdiff
path: root/dbus/dbus-internals.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-07-12 15:28:54 +0100
committerSimon McVittie <smcv@collabora.com>2018-08-02 17:17:15 +0100
commit375bffed7b75e59dc32fedd78e0c918586f26cbd (patch)
treeb08bb5eb637a672f1a9fd00adcb5bcfe0b6d2077 /dbus/dbus-internals.c
parentbbe7935196db250898a25b5fdb2f8bf5e972b37d (diff)
downloaddbus-375bffed7b75e59dc32fedd78e0c918586f26cbd.tar.gz
Don't do OOM testing under valgrind by default
It's just painfully slow, particularly when we fork (as we do in test-bus to test service activation). Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194
Diffstat (limited to 'dbus/dbus-internals.c')
-rw-r--r--dbus/dbus-internals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c
index 061c527b..b1c89520 100644
--- a/dbus/dbus-internals.c
+++ b/dbus/dbus-internals.c
@@ -1056,6 +1056,7 @@ _dbus_test_oom_handling (const char *description,
description, approx_mallocs);
setting = _dbus_getenv ("DBUS_TEST_MALLOC_FAILURES");
+
if (setting != NULL)
{
DBusString str;
@@ -1071,6 +1072,14 @@ _dbus_test_oom_handling (const char *description,
max_failures_to_try = 4;
}
+ if (RUNNING_ON_VALGRIND && _dbus_getenv ("DBUS_TEST_SLOW") == NULL)
+ {
+ /* The full OOM testing is slow, valgrind is slow, so the
+ * combination is just horrible. Only do this if the user
+ * asked for extra-slow tests. */
+ max_failures_to_try = 0;
+ }
+
if (max_failures_to_try < 1)
{
_dbus_test_diag ("not testing OOM handling");