]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
tests: Improve diagnostics for malloc-failure tests
authorSimon McVittie <smcv@collabora.com>
Sat, 29 Jun 2019 22:34:41 +0000 (23:34 +0100)
committerSimon McVittie <smcv@collabora.com>
Tue, 2 Jul 2019 19:45:59 +0000 (20:45 +0100)
Some of these appear to hang, but making this diagnostic appear in the
log reveals the truth: it's just very slow.

Signed-off-by: Simon McVittie <smcv@collabora.com>
dbus/dbus-internals.c

index 2f456edab232d7cbcf4556acea78d479f701b114..7420f2038aa385a6da842ad57193a77207994e45 100644 (file)
@@ -1003,9 +1003,9 @@ run_failing_each_malloc (int                    n_mallocs,
     {      
       _dbus_set_fail_alloc_counter (n_mallocs);
 
-      _dbus_verbose ("\n===\n%s: (will fail malloc %d with %d failures)\n===\n",
-                     description, n_mallocs,
-                     _dbus_get_fail_alloc_failures ());
+      _dbus_test_diag ("%s: will fail malloc %d and %d that follow",
+                       description, n_mallocs,
+                       _dbus_get_fail_alloc_failures () - 1);
 
       if (!(* func) (data, FALSE))
         return FALSE;