s4: torture: Add a TALLOC_CTX * to torture_vfs_fruit(), torture_vfs_fruit_netatalk...
authorJeremy Allison <jra@samba.org>
Mon, 24 Apr 2017 22:48:42 +0000 (15:48 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 5 May 2017 13:52:13 +0000 (15:52 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source4/torture/vfs/fruit.c
source4/torture/vfs/vfs.c

index bb8f36ea056d0843ab1249ef511d7c7117a15cc5..96edec240367c838030f488844dae3dae24ef00f 100644 (file)
@@ -4050,10 +4050,10 @@ done:
  *
  * When running against an OS X SMB server add "--option=torture:osx=true"
  */
-struct torture_suite *torture_vfs_fruit(void)
+struct torture_suite *torture_vfs_fruit(TALLOC_CTX *ctx)
 {
        struct torture_suite *suite = torture_suite_create(
-               talloc_autofree_context(), "fruit");
+               ctx, "fruit");
 
        suite->description = talloc_strdup(suite, "vfs_fruit tests");
 
@@ -4084,10 +4084,10 @@ struct torture_suite *torture_vfs_fruit(void)
        return suite;
 }
 
-struct torture_suite *torture_vfs_fruit_netatalk(void)
+struct torture_suite *torture_vfs_fruit_netatalk(TALLOC_CTX *ctx)
 {
        struct torture_suite *suite = torture_suite_create(
-               talloc_autofree_context(), "fruit_netatalk");
+               ctx, "fruit_netatalk");
 
        suite->description = talloc_strdup(suite, "vfs_fruit tests for Netatalk interop that require fruit:metadata=netatalk");
 
@@ -4097,10 +4097,10 @@ struct torture_suite *torture_vfs_fruit_netatalk(void)
        return suite;
 }
 
-struct torture_suite *torture_vfs_fruit_file_id(void)
+struct torture_suite *torture_vfs_fruit_file_id(TALLOC_CTX *ctx)
 {
        struct torture_suite *suite =
-           torture_suite_create(talloc_autofree_context(), "fruit_file_id");
+           torture_suite_create(ctx, "fruit_file_id");
 
        suite->description =
            talloc_strdup(suite, "vfs_fruit tests for on-disk file ID that "
index fef74915e90ed0ad8504fb1d649558023a868000..eef1f89a37ceee44d77cfcf9b7b66e8e2f3a8bec 100644 (file)
@@ -108,10 +108,10 @@ NTSTATUS torture_vfs_init(TALLOC_CTX *ctx)
 
        suite->description = talloc_strdup(suite, "VFS modules tests");
 
-       torture_suite_add_suite(suite, torture_vfs_fruit());
-       torture_suite_add_suite(suite, torture_vfs_fruit_netatalk());
+       torture_suite_add_suite(suite, torture_vfs_fruit(suite));
+       torture_suite_add_suite(suite, torture_vfs_fruit_netatalk(suite));
        torture_suite_add_suite(suite, torture_acl_xattr(suite));
-       torture_suite_add_suite(suite, torture_vfs_fruit_file_id());
+       torture_suite_add_suite(suite, torture_vfs_fruit_file_id(suite));
 
        torture_register_suite(ctx, suite);