void epan_cleanup(void) { dfilter_cleanup(); proto_cleanup(); prefs_cleanup(); packet_cleanup(); expert_cleanup(); capture_dissector_cleanup(); #ifdef HAVE_LUA wslua_cleanup(); #endif #ifdef HAVE_LIBGNUTLS gnutls_global_deinit(); #endif except_deinit(); addr_resolv_cleanup(); if (pinfo_pool_cache != NULL) { wmem_destroy_allocator(pinfo_pool_cache); pinfo_pool_cache = NULL; } wmem_cleanup(); }
int main(int argc, char **argv) { int ret; wmem_init(); g_test_init(&argc, &argv, NULL); g_test_add_func("/wmem/allocator/block", wmem_test_allocator_block); g_test_add_func("/wmem/allocator/blk_fast", wmem_test_allocator_block_fast); g_test_add_func("/wmem/allocator/simple", wmem_test_allocator_simple); g_test_add_func("/wmem/allocator/strict", wmem_test_allocator_strict); g_test_add_func("/wmem/allocator/callbacks", wmem_test_allocator_callbacks); g_test_add_func("/wmem/utils/misc", wmem_test_miscutls); g_test_add_func("/wmem/utils/strings", wmem_test_strutls); g_test_add_func("/wmem/datastruct/array", wmem_test_array); g_test_add_func("/wmem/datastruct/list", wmem_test_list); g_test_add_func("/wmem/datastruct/map", wmem_test_map); g_test_add_func("/wmem/datastruct/queue", wmem_test_queue); g_test_add_func("/wmem/datastruct/stack", wmem_test_stack); g_test_add_func("/wmem/datastruct/strbuf", wmem_test_strbuf); g_test_add_func("/wmem/datastruct/tree", wmem_test_tree); g_test_add_func("/wmem/timing/allocators", wmem_time_allocators); ret = g_test_run(); wmem_cleanup(); return ret; }
void epan_cleanup(void) { cleanup_dissection(); dfilter_cleanup(); proto_cleanup(); prefs_cleanup(); packet_cleanup(); oid_resolv_cleanup(); #ifdef HAVE_LIBGNUTLS gnutls_global_deinit(); #endif except_deinit(); host_name_lookup_cleanup(); wmem_cleanup(); }
int main(int argc, char **argv) { int result; g_test_init(&argc, &argv, NULL); /* /oids/2encoded */ g_test_add_func("/oids/2encoded/subids/simple", oids_test_2encoded_subids_simple); g_test_add_func("/oids/2encoded/subids/bad", oids_test_2encoded_subids_bad); g_test_add_func("/oids/2encoded/string/simple", oids_test_2encoded_string_simple); g_test_add_func("/oids/2encoded/string/short", oids_test_2encoded_string_short); g_test_add_func("/oids/2encoded/string/long", oids_test_2encoded_string_long); g_test_add_func("/oids/2encoded/string/tooshort", oids_test_2encoded_string_tooshort); /* /oids/2subids */ g_test_add_func("/oids/2subids/string", oids_test_2subids_string); g_test_add_func("/oids/2subids/string/tooshort", oids_test_2subids_string_tooshort); g_test_add_func("/oids/2subids/encoded", oids_test_2subids_encoded); g_test_add_func("/oids/2subids/encoded/long", oids_test_2subids_encoded_long); g_test_add_func("/oids/2subids/encoded/absviasub", oids_test_2subids_encoded_absviasub); g_test_add_func("/oids/2subids/encoded/relviasub", oids_test_2subids_encoded_relviasub); /* /oids/2string */ g_test_add_func("/oids/2string/subids/abs", oids_test_2string_subids_abs); g_test_add_func("/oids/2string/subids/rel", oids_test_2string_subids_rel); g_test_add_func("/oids/2string/subids/absviarel", oids_test_2string_subids_absviarel); g_test_add_func("/oids/2string/subids/relsizes", oids_test_2string_subids_relsizes); g_test_add_func("/oids/2string/encoded", oids_test_2string_encoded); g_test_add_func("/oids/2string/encoded/rel", oids_test_2string_encoded_rel); /* /oids/2resolved */ g_test_add_func("/oids/2resolved/subids", oids_test_2resolved_subids); g_test_add_func("/oids/2resolved/encoded", oids_test_2resolved_encoded); g_test_add_func("/oids/2resolved/encoded/rel", oids_test_2resolved_encoded_rel); g_test_add_func("/oids/2resolved/string", oids_test_2resolved_string); /* /oids/2both */ g_test_add_func("/oids/2both/subids", oids_test_2both_subids); g_test_add_func("/oids/2both/encoded", oids_test_2both_encoded); g_test_add_func("/oids/2both/string", oids_test_2both_string); /* /oids/2struct */ g_test_add_func("/oids/2struct/subids", oids_test_2struct_subids); g_test_add_func("/oids/2struct/encoded", oids_test_2struct_encoded); g_test_add_func("/oids/2struct/string", oids_test_2struct_string); /* /oids/add */ g_test_add_func("/oids/add/subids", oids_test_add_subids); g_test_add_func("/oids/add/encoded", oids_test_add_encoded); g_test_add_func("/oids/add/string", oids_test_add_string); emem_init(); wmem_init(); oids_init(); result = g_test_run(); oids_cleanup(); wmem_cleanup(); /* * This might have been a good place for a call to ep_free_all() but that is not part of the * public interface for emem.h */ return result; }