git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d413bee
)
talloc: reset the globals after each subtest
author
Stefan Metzmacher
<metze@samba.org>
Mon, 13 Jul 2009 16:52:44 +0000
(18:52 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 13 Jul 2009 18:54:29 +0000
(20:54 +0200)
metze
lib/talloc/testsuite.c
patch
|
blob
|
history
diff --git
a/lib/talloc/testsuite.c
b/lib/talloc/testsuite.c
index 3d490ddf49319139093893caff827c9fd0346bc6..4c931a1b8461bdf8eb0875df1cd746304415e26a 100644
(file)
--- a/
lib/talloc/testsuite.c
+++ b/
lib/talloc/testsuite.c
@@
-1103,6
+1103,12
@@
static bool test_pool(void)
return true;
}
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)
{
struct torture_context;
bool torture_local_talloc(struct torture_context *tctx)
{
@@
-1110,33
+1116,53
@@
bool torture_local_talloc(struct torture_context *tctx)
setlinebuf(stdout);
setlinebuf(stdout);
- talloc_disable_null_tracking();
- talloc_enable_null_tracking();
-
+ test_reset();
ret &= test_ref1();
ret &= test_ref1();
+ test_reset();
ret &= test_ref2();
ret &= test_ref2();
+ test_reset();
ret &= test_ref3();
ret &= test_ref3();
+ test_reset();
ret &= test_ref4();
ret &= test_ref4();
+ test_reset();
ret &= test_unlink1();
ret &= test_unlink1();
+ test_reset();
ret &= test_misc();
ret &= test_misc();
+ test_reset();
ret &= test_realloc();
ret &= test_realloc();
+ test_reset();
ret &= test_realloc_child();
ret &= test_realloc_child();
+ test_reset();
ret &= test_steal();
ret &= test_steal();
+ test_reset();
ret &= test_move();
ret &= test_move();
+ test_reset();
ret &= test_unref_reparent();
ret &= test_unref_reparent();
+ test_reset();
ret &= test_realloc_fn();
ret &= test_realloc_fn();
+ test_reset();
ret &= test_type();
ret &= test_type();
+ test_reset();
ret &= test_lifeless();
ret &= test_lifeless();
+ test_reset();
ret &= test_loop();
ret &= test_loop();
+ test_reset();
ret &= test_free_parent_deny_child();
ret &= test_free_parent_deny_child();
+ test_reset();
ret &= test_talloc_ptrtype();
ret &= test_talloc_ptrtype();
+ test_reset();
ret &= test_talloc_free_in_destructor();
ret &= test_talloc_free_in_destructor();
+ test_reset();
ret &= test_pool();
if (ret) {
ret &= test_pool();
if (ret) {
+ test_reset();
ret &= test_speed();
}
ret &= test_speed();
}
+ test_reset();
ret &= test_autofree();
ret &= test_autofree();
+ test_reset();
+
return ret;
}
return ret;
}