[PATCH] fix durable-open.reopen4 test

Michael Adam obnox at samba.org
Thu Jan 30 13:13:14 MST 2014


Hi!

Attached find two patches that allow us to pass the
durable.reopen4 test. The problem was that the test
used delete-on-close which we simply don't support
yet on durable handles...

review and push appreciated.

Thanks - Michael
-------------- next part --------------
From f5df9880f2df9d5b03974ab77d5b002b7ebb2c63 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 28 Jan 2014 23:43:58 +0100
Subject: [PATCH 1/2] s4:torture:smb2: fix durable-open.reopen4

We currently don't support durable handles with delete-on-close:
with delete-on-close, we close a durable handle with delete-on-close
set upon disconnect.

This patch adapts the test to behave accordingly,
i.e. don't use delete-on-close...

Signed-off-by: Michael Adam <obnox at samba.org>
---
 source4/torture/smb2/durable_open.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index 42faa68..395cf3f 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -1297,7 +1297,6 @@ static bool test_durable_open_reopen4(struct torture_context *tctx,
 				 smb2_util_share_access(""),
 				 smb2_util_oplock_level("b"));
 	io1.in.durable_open = true;
-	io1.in.create_options |= NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
 
 	status = smb2_create(tree, mem_ctx, &io1);
 	CHECK_STATUS(status, NT_STATUS_OK);
-- 
1.8.3.2


From 2d986fc015aff21f23e50396e2272116103b96e4 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 28 Jan 2014 23:56:06 +0100
Subject: [PATCH 2/2] selftets: durable-open.reopen4 succeeds now.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 selftest/knownfail | 1 -
 1 file changed, 1 deletion(-)

diff --git a/selftest/knownfail b/selftest/knownfail
index 81f737a..65f9fd2 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -188,7 +188,6 @@
 ^samba3.smb2.notify.dir
 ^samba3.smb2.notify.rec
 ^samba3.smb2.durable-open.lock-lease
-^samba3.smb2.durable-open.reopen4
 ^samba3.smb2.durable-open.delete_on_close2
 ^samba3.smb2.durable-v2-open.open-lease
 ^samba3.smb2.durable-v2-open.persistent-open-lease
-- 
1.8.3.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 215 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140130/1eb4a9e1/attachment.pgp>


More information about the samba-technical mailing list