summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-29 17:25:00 +0200
committerMichael Adam <obnox@samba.org>2011-10-30 18:41:22 +0100
commitf8aeca1018cf036b3294f2d6807fd35b2de2c44b (patch)
tree997b87f1d3e1bf6ef51f522039dc18dccd3be65e /source4/torture
parent530cd2aac6178570c182b6f33364c7d3c6316c00 (diff)
downloadsamba-f8aeca1018cf036b3294f2d6807fd35b2de2c44b.tar.gz
samba-f8aeca1018cf036b3294f2d6807fd35b2de2c44b.tar.bz2
samba-f8aeca1018cf036b3294f2d6807fd35b2de2c44b.zip
s4:torture:smb2: check wheter open was durable in existing tests
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/durable_open.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/torture/smb2/durable_open.c b/source4/torture/smb2/durable_open.c
index be407bc319..28833d70a8 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -92,6 +92,7 @@ bool test_durable_open_file_position(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
h1 = io1.out.file.handle;
CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+ CHECK_VAL(io1.out.durable_open, true);
CHECK_VAL(io1.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
/* TODO: check extra blob content */
@@ -138,6 +139,7 @@ bool test_durable_open_file_position(struct torture_context *tctx,
status = smb2_create(tree2, mem_ctx, &io2);
CHECK_STATUS(status, NT_STATUS_OK);
+ CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
CHECK_VAL(io2.out.reserved, 0x00);
CHECK_VAL(io2.out.create_action, NTCREATEX_ACTION_EXISTED);
@@ -217,6 +219,7 @@ bool test_durable_open_oplock(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
h1 = io1.out.file.handle;
CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+ CHECK_VAL(io1.out.durable_open, true);
CHECK_VAL(io1.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
/* Disconnect after getting the batch */
@@ -232,6 +235,7 @@ bool test_durable_open_oplock(struct torture_context *tctx,
CHECK_STATUS(status, NT_STATUS_OK);
h2 = io2.out.file.handle;
CHECK_CREATED(&io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
+ CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
/* What if tree1 tries to come back and reclaim? */
@@ -321,6 +325,7 @@ bool test_durable_open_lease(struct torture_context *tctx,
status = smb2_create(tree1, mem_ctx, &io1);
CHECK_STATUS(status, NT_STATUS_OK);
h1 = io1.out.file.handle;
+ CHECK_VAL(io1.out.durable_open, true);
CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_VAL(io1.out.oplock_level, SMB2_OPLOCK_LEVEL_LEASE);
@@ -344,6 +349,7 @@ bool test_durable_open_lease(struct torture_context *tctx,
status = smb2_create(tree2, mem_ctx, &io2);
CHECK_STATUS(status, NT_STATUS_OK);
h2 = io2.out.file.handle;
+ CHECK_VAL(io2.out.durable_open, true);
CHECK_CREATED(&io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_VAL(io2.out.oplock_level, SMB2_OPLOCK_LEVEL_LEASE);
@@ -435,6 +441,7 @@ bool test_durable_open_lock(struct torture_context *tctx,
h = io.out.file.handle;
CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+ CHECK_VAL(io.out.durable_open, true);
CHECK_VAL(io.out.oplock_level, SMB2_OPLOCK_LEVEL_LEASE);
CHECK_VAL(io.out.lease_response.lease_key.data[0], lease);
CHECK_VAL(io.out.lease_response.lease_key.data[1], ~lease);
@@ -548,6 +555,7 @@ bool test_durable_open_open(struct torture_context *tctx,
status = smb2_create(tree1, mem_ctx, &io1);
CHECK_STATUS(status, NT_STATUS_OK);
h1 = io1.out.file.handle;
+ CHECK_VAL(io1.out.durable_open, true);
CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_VAL(io1.out.oplock_level, SMB2_OPLOCK_LEVEL_LEASE);