Merge branch 'malloc-fail-diags' into 'master'

tests: Improve diagnostics for malloc-failure tests

See merge request dbus/dbus!118
This commit is contained in:
Simon McVittie 2019-07-03 13:41:21 +00:00
commit b8912cf770

View 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;