From 12e0c579785b84a99ad6f1877aa1c45391aba60e Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sun, 21 Aug 2022 18:55:29 +0200 Subject: [PATCH] smbtorture: close handle and delete file in tree_base() 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 Reviewed-by: Jeremy Allison --- source4/torture/rpc/fsrvp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c index 63b03f920d5..1b389477a8c 100644 --- a/source4/torture/rpc/fsrvp.c +++ b/source4/torture/rpc/fsrvp.c @@ -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; -- 2.47.3