summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-13 18:52:44 +0200
committerAndrew Tridgell <tridge@samba.org>2009-08-24 16:29:57 +1000
commit13227f83b9efb549ae05a0b508095de288347386 (patch)
tree523eafd3925f3a1bdd9fe64630dbd25800881c0c
parent1fbc86c57a60fdb828a50d24c65750ba01b92f10 (diff)
downloadsamba-13227f83b9efb549ae05a0b508095de288347386.tar.gz
samba-13227f83b9efb549ae05a0b508095de288347386.tar.bz2
samba-13227f83b9efb549ae05a0b508095de288347386.zip
talloc/testsuite: reset the globals after each subtest
metze
-rw-r--r--lib/talloc/testsuite.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c
index 248edfb40d..262228760a 100644
--- a/lib/talloc/testsuite.c
+++ b/lib/talloc/testsuite.c
@@ -1107,6 +1107,12 @@ static bool test_pool(void)
return true;
}
+static void test_reset(void)
+{
+ talloc_disable_null_tracking();
+ talloc_enable_null_tracking();
+}
+
struct torture_context;
bool torture_local_talloc(struct torture_context *tctx)
{
@@ -1114,33 +1120,53 @@ bool torture_local_talloc(struct torture_context *tctx)
setlinebuf(stdout);
- talloc_disable_null_tracking();
- talloc_enable_null_tracking();
-
+ test_reset();
ret &= test_ref1();
+ test_reset();
ret &= test_ref2();
+ test_reset();
ret &= test_ref3();
+ test_reset();
ret &= test_ref4();
+ test_reset();
ret &= test_unlink1();
+ test_reset();
ret &= test_misc();
+ test_reset();
ret &= test_realloc();
+ test_reset();
ret &= test_realloc_child();
+ test_reset();
ret &= test_steal();
+ test_reset();
ret &= test_move();
+ test_reset();
ret &= test_unref_reparent();
+ test_reset();
ret &= test_realloc_fn();
+ test_reset();
ret &= test_type();
+ test_reset();
ret &= test_lifeless();
+ test_reset();
ret &= test_loop();
+ test_reset();
ret &= test_free_parent_deny_child();
+ test_reset();
ret &= test_talloc_ptrtype();
+ test_reset();
ret &= test_talloc_free_in_destructor();
+ test_reset();
ret &= test_pool();
if (ret) {
+ test_reset();
ret &= test_speed();
}
+ test_reset();
ret &= test_autofree();
+ test_reset();
+
return ret;
}