summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/nbt/dgram.c4
-rw-r--r--source4/torture/nbt/nbt.c19
-rw-r--r--source4/torture/nbt/query.c5
-rw-r--r--source4/torture/nbt/register.c4
-rw-r--r--source4/torture/nbt/wins.c5
-rw-r--r--source4/torture/nbt/winsbench.c7
-rw-r--r--source4/torture/nbt/winsreplication.c5
7 files changed, 22 insertions, 27 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index ee97242de5..c5b009979e 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -340,9 +340,9 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
/*
test nbt dgram operations
*/
-struct torture_suite *torture_nbt_dgram(void)
+struct torture_suite *torture_nbt_dgram(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "DGRAM");
+ struct torture_suite *suite = torture_suite_create(suite, "DGRAM");
torture_suite_add_simple_test(suite, "netlogon", nbt_test_netlogon);
torture_suite_add_simple_test(suite, "netlogon2", nbt_test_netlogon2);
diff --git a/source4/torture/nbt/nbt.c b/source4/torture/nbt/nbt.c
index 5c941c60c9..2a3678ee75 100644
--- a/source4/torture/nbt/nbt.c
+++ b/source4/torture/nbt/nbt.c
@@ -29,7 +29,7 @@ bool torture_nbt_get_name(struct torture_context *tctx,
const char **address)
{
make_nbt_name_server(name, strupper_talloc(tctx,
- torture_setting_string(tctx, "host", NULL)));
+ torture_setting_string(tctx, "host", NULL)));
/* do an initial name resolution to find its IP */
torture_assert_ntstatus_ok(tctx,
@@ -43,18 +43,17 @@ bool torture_nbt_get_name(struct torture_context *tctx,
NTSTATUS torture_nbt_init(void)
{
struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "NBT");
+ talloc_autofree_context(), "NBT");
/* nbt tests */
- torture_suite_add_suite(suite, torture_nbt_register());
- torture_suite_add_suite(suite, torture_nbt_wins());
- torture_suite_add_suite(suite, torture_nbt_dgram());
- torture_suite_add_suite(suite, torture_nbt_winsreplication());
- torture_suite_add_suite(suite, torture_bench_nbt());
- torture_suite_add_suite(suite, torture_bench_wins());
+ torture_suite_add_suite(suite, torture_nbt_register(suite));
+ torture_suite_add_suite(suite, torture_nbt_wins(suite));
+ torture_suite_add_suite(suite, torture_nbt_dgram(suite));
+ torture_suite_add_suite(suite, torture_nbt_winsreplication(suite));
+ torture_suite_add_suite(suite, torture_bench_nbt(suite));
+ torture_suite_add_suite(suite, torture_bench_wins(suite));
suite->description = talloc_strdup(suite,
- "NetBIOS over TCP/IP and WINS tests");
+ "NetBIOS over TCP/IP and WINS tests");
torture_register_suite(suite);
diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c
index 5794d840ec..2f3a51a98c 100644
--- a/source4/torture/nbt/query.c
+++ b/source4/torture/nbt/query.c
@@ -104,10 +104,9 @@ static bool bench_namequery(struct torture_context *tctx)
/*
benchmark how fast a server can respond to name queries
*/
-struct torture_suite *torture_bench_nbt(void)
+struct torture_suite *torture_bench_nbt(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(talloc_autofree_context(),
- "BENCH");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, "BENCH");
torture_suite_add_simple_test(suite, "namequery", bench_namequery);
return suite;
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index 03cc4e6cee..50c7cd3398 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -155,11 +155,11 @@ static bool nbt_refresh_own(struct torture_context *tctx)
/*
test name registration to a server
*/
-struct torture_suite *torture_nbt_register(void)
+struct torture_suite *torture_nbt_register(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite;
- suite = torture_suite_create(talloc_autofree_context(), "REGISTER");
+ suite = torture_suite_create(mem_ctx, "REGISTER");
torture_suite_add_simple_test(suite, "register_own", nbt_register_own);
torture_suite_add_simple_test(suite, "refresh_own", nbt_refresh_own);
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index 7f3ed8e415..e2c51ab1a8 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -284,10 +284,9 @@ static bool nbt_test_wins(struct torture_context *tctx)
/*
test WINS operations
*/
-struct torture_suite *torture_nbt_wins(void)
+struct torture_suite *torture_nbt_wins(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(talloc_autofree_context(),
- "WINS");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, "WINS");
torture_suite_add_simple_test(suite, "wins", nbt_test_wins);
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index f06db648fc..27edd57206 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -282,11 +282,10 @@ static bool bench_wins(struct torture_context *tctx)
benchmark how fast a WINS server can respond to a mixture of
registration/refresh/release and name query requests
*/
-struct torture_suite *torture_bench_wins(void)
+struct torture_suite *torture_bench_wins(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "BENCH-WINS");
+ struct torture_suite *suite = torture_suite_create(mem_ctx,
+ "BENCH-WINS");
torture_suite_add_simple_test(suite, "wins", bench_wins);
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 0d9e758647..69ef56231b 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -9669,11 +9669,10 @@ static bool torture_nbt_winsreplication_owned(struct torture_context *tctx)
/*
test simple WINS replication operations
*/
-struct torture_suite *torture_nbt_winsreplication(void)
+struct torture_suite *torture_nbt_winsreplication(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "WINSREPLICATION");
+ mem_ctx, "WINSREPLICATION");
struct torture_tcase *tcase;
tcase = torture_suite_add_simple_test(suite, "assoc_ctx1",