From: Jeremy Allison Date: Mon, 24 Apr 2017 22:37:12 +0000 (-0700) Subject: s4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_o... X-Git-Tag: ldb-1.1.30~321 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c5f37733cd12c33f7ddb409c3ea0ddc9f3877d0;p=thirdparty%2Fsamba.git s4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_oplocks_init(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source4/torture/smb2/oplock.c b/source4/torture/smb2/oplock.c index 53a6c18f693..83197a4f4a8 100644 --- a/source4/torture/smb2/oplock.c +++ b/source4/torture/smb2/oplock.c @@ -3947,10 +3947,10 @@ static void levelII501_timeout_cb(struct tevent_context *ev, state->done = true; } -struct torture_suite *torture_smb2_oplocks_init(void) +struct torture_suite *torture_smb2_oplocks_init(TALLOC_CTX *ctx) { struct torture_suite *suite = - torture_suite_create(talloc_autofree_context(), "oplock"); + torture_suite_create(ctx, "oplock"); torture_suite_add_2smb2_test(suite, "exclusive1", test_smb2_oplock_exclusive1); torture_suite_add_2smb2_test(suite, "exclusive2", test_smb2_oplock_exclusive2); @@ -4332,10 +4332,10 @@ done: return ret; } -struct torture_suite *torture_smb2_kernel_oplocks_init(void) +struct torture_suite *torture_smb2_kernel_oplocks_init(TALLOC_CTX *ctx) { struct torture_suite *suite = - torture_suite_create(talloc_autofree_context(), "kernel-oplocks"); + torture_suite_create(ctx, "kernel-oplocks"); torture_suite_add_1smb2_test(suite, "kernel_oplocks1", test_smb2_kernel_oplocks1); torture_suite_add_1smb2_test(suite, "kernel_oplocks2", test_smb2_kernel_oplocks2); diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c index 50391a5c50a..55716a3b801 100644 --- a/source4/torture/smb2/smb2.c +++ b/source4/torture/smb2/smb2.c @@ -166,8 +166,8 @@ NTSTATUS torture_smb2_init(TALLOC_CTX *ctx) torture_suite_add_suite(suite, torture_smb2_lease_init(suite)); torture_suite_add_suite(suite, torture_smb2_compound_init(suite)); torture_suite_add_suite(suite, torture_smb2_compound_find_init(suite)); - torture_suite_add_suite(suite, torture_smb2_oplocks_init()); - torture_suite_add_suite(suite, torture_smb2_kernel_oplocks_init()); + torture_suite_add_suite(suite, torture_smb2_oplocks_init(suite)); + torture_suite_add_suite(suite, torture_smb2_kernel_oplocks_init(suite)); torture_suite_add_suite(suite, torture_smb2_streams_init()); torture_suite_add_suite(suite, torture_smb2_ioctl_init(suite)); torture_suite_add_suite(suite, torture_smb2_rename_init());