summaryrefslogtreecommitdiffstats
path: root/source3/lib/talloc/testsuite.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-19 09:08:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:29 -0500
commit3255daa1888c7d2f10e929b1d0614db4a0a013e7 (patch)
treedf87351e4f5282a34936810f101a52603b42d950 /source3/lib/talloc/testsuite.c
parent4c8dc9c11eb97b1b20b3b6a03a155acb2dfc193b (diff)
downloadsamba-3255daa1888c7d2f10e929b1d0614db4a0a013e7.tar.gz
samba-3255daa1888c7d2f10e929b1d0614db4a0a013e7.tar.xz
samba-3255daa1888c7d2f10e929b1d0614db4a0a013e7.zip
r22366: sync lib/talloc/ with samba4
metze (This used to be commit 7fab12b34a818f029f4285a59d6e49768b7f8e79)
Diffstat (limited to 'source3/lib/talloc/testsuite.c')
-rw-r--r--source3/lib/talloc/testsuite.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/lib/talloc/testsuite.c b/source3/lib/talloc/testsuite.c
index f51252e57b..d122a5de0d 100644
--- a/source3/lib/talloc/testsuite.c
+++ b/source3/lib/talloc/testsuite.c
@@ -1012,6 +1012,8 @@ static bool test_talloc_ptrtype(void)
static bool test_autofree(void)
{
+#if _SAMBA_BUILD_ < 4
+ /* autofree test would kill smbtorture */
void *p;
printf("test: autofree [\nTALLOC AUTOFREE CONTEXT\n]\n");
@@ -1022,13 +1024,17 @@ static bool test_autofree(void)
talloc_free(p);
printf("success: autofree\n");
+#endif
return true;
}
-int main(void)
+struct torture_context;
+bool torture_local_talloc(struct torture_context *tctx)
{
bool ret = true;
+ setlinebuf(stdout);
+
talloc_disable_null_tracking();
talloc_enable_null_tracking();
@@ -1055,7 +1061,15 @@ int main(void)
}
ret &= test_autofree();
+ return ret;
+}
+
+#if _SAMBA_BUILD_ < 4
+int main(void)
+{
+ bool ret = torture_local_talloc(NULL);
if (!ret)
return -1;
return 0;
}
+#endif