]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbtorture: close handle and delete file in tree_base()
authorRalph Boehme <slow@samba.org>
Sun, 21 Aug 2022 16:55:29 +0000 (18:55 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 29 Aug 2022 17:22:32 +0000 (17:22 +0000)
Otherwise the session might still be around with the open handle when the next
test starts and then fails to delete the testfile.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14215

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/rpc/fsrvp.c

index 63b03f920d55121c2b111ebf8a90551e6fe87c53..1b389477a8c52bd7aece153ee8187a02d544321b 100644 (file)
@@ -692,6 +692,11 @@ static bool test_fsrvp_enum_created(struct torture_context *tctx,
                       "count");
        torture_assert_int_equal(tctx, count, 2, "num snaps");
 
+       smb2_util_close(tree_base, base_fh);
+       ZERO_STRUCT(base_fh);
+
+       smb2_util_unlink(tree_base, FNAME);
+
        talloc_free(tmp_ctx);
 
        return true;