int main(void) { bool ret = true; talloc_disable_null_tracking(); talloc_enable_null_tracking(); ret &= test_ref1(); ret &= test_ref2(); ret &= test_ref3(); ret &= test_ref4(); ret &= test_unlink1(); ret &= test_misc(); ret &= test_realloc(); ret &= test_realloc_child(); ret &= test_steal(); ret &= test_move(); ret &= test_unref_reparent(); ret &= test_realloc_fn(); ret &= test_type(); ret &= test_lifeless(); ret &= test_loop(); ret &= test_free_parent_deny_child(); ret &= test_talloc_ptrtype(); if (ret) { ret &= test_speed(); } ret &= test_autofree(); if (!ret) return -1; return 0; }
int main(int argc, char *argv[]) { plan_tests(10); failtest_init(argc, argv); talloc_enable_null_tracking(); if (null_context) { ok1(test_talloc_ptrtype(NULL)); /* This closes the leak, but don't free any other leaks! */ ok1(!talloc_chunk_from_ptr(null_context)->child); talloc_disable_null_tracking(); } failtest_exit(exit_status()); }
bool torture_local_talloc(struct torture_context *tctx) { bool ret = true; setlinebuf(stdout); talloc_disable_null_tracking(); talloc_enable_null_tracking(); ret &= test_ref1(); ret &= test_ref2(); ret &= test_ref3(); ret &= test_ref4(); ret &= test_unlink1(); ret &= test_misc(); ret &= test_realloc(); ret &= test_realloc_child(); ret &= test_steal(); ret &= test_move(); ret &= test_unref_reparent(); ret &= test_realloc_fn(); ret &= test_type(); ret &= test_lifeless(); ret &= test_loop(); ret &= test_free_parent_deny_child(); ret &= test_talloc_ptrtype(); ret &= test_talloc_free_in_destructor(); ret &= test_pool(); if (ret) { ret &= test_speed(); } ret &= test_autofree(); return ret; }