mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
regress_dns: drop hack for event_debug_map_HT_GROW in leak tests
This commit is contained in:
parent
941faaed39
commit
3540a193b5
@ -1788,8 +1788,14 @@ testleak_setup(const struct testcase_t *testcase)
|
|||||||
struct testleak_env_t *env;
|
struct testleak_env_t *env;
|
||||||
|
|
||||||
allocated_chunks = 0;
|
allocated_chunks = 0;
|
||||||
|
|
||||||
|
/* Reset allocation counter, to start allocations from the very beginning.
|
||||||
|
* (this will avoid false-positive negative numbers for allocated_chunks)
|
||||||
|
*/
|
||||||
|
libevent_global_shutdown();
|
||||||
|
|
||||||
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
|
event_set_mem_functions(cnt_malloc, cnt_realloc, cnt_free);
|
||||||
if (!libevent_tests_running_in_debug_mode)
|
|
||||||
event_enable_debug_mode();
|
event_enable_debug_mode();
|
||||||
|
|
||||||
/* not mm_calloc: we don't want to mess with the count. */
|
/* not mm_calloc: we don't want to mess with the count. */
|
||||||
@ -1811,8 +1817,8 @@ testleak_cleanup(const struct testcase_t *testcase, void *env_)
|
|||||||
#ifdef EVENT__DISABLE_DEBUG_MODE
|
#ifdef EVENT__DISABLE_DEBUG_MODE
|
||||||
tt_int_op(allocated_chunks, ==, 0);
|
tt_int_op(allocated_chunks, ==, 0);
|
||||||
#else
|
#else
|
||||||
/* FIXME: that's `1' because of event_debug_map_HT_GROW */
|
libevent_global_shutdown();
|
||||||
tt_int_op(allocated_chunks, ==, 1);
|
tt_int_op(allocated_chunks, ==, 0);
|
||||||
#endif
|
#endif
|
||||||
ok = 1;
|
ok = 1;
|
||||||
end:
|
end:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user