From: Ralph Boehme Date: Sun, 21 Aug 2022 16:55:29 +0000 (+0200) Subject: smbtorture: close handle and delete file in tree_base() X-Git-Tag: talloc-2.4.0~1241 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12e0c579785b84a99ad6f1877aa1c45391aba60e;p=thirdparty%2Fsamba.git 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 --- 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;