summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-09-09 18:53:15 +0000
committerJeremy Allison <jra@samba.org>2013-10-15 01:52:29 +0200
commitc92ac4c8eebf4ddaaab4e8b640650406b259b05d (patch)
tree431f0c1fbbe9657c9e5eac6f9ef63d35189af60e /source4
parentfcafaf6022832835fc8fa76a4c33056605dc53e4 (diff)
downloadsamba-c92ac4c8eebf4ddaaab4e8b640650406b259b05d.tar.gz
samba-c92ac4c8eebf4ddaaab4e8b640650406b259b05d.tar.bz2
samba-c92ac4c8eebf4ddaaab4e8b640650406b259b05d.zip
torture: Extend raw.oplock.batch10
With FAKE_LEVEL_II_OPLOCKS around we did not grant LEVEL2 after a NO_OPLOCK file got written to. Windows does grant LEVEL2 in this case. With the have_level2_oplocks in brlocks.tdb we can now grant LEVEL2 in this case as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/oplock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index b4aac1154b..34e270d825 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -1696,6 +1696,18 @@ static bool test_raw_oplock_batch10(struct torture_context *tctx, struct smbcli_
CHECK_VAL(break_info.failures, 0);
CHECK_VAL(io.ntcreatex.out.oplock_level, 0);
+ {
+ union smb_write wr;
+ wr.write.level = RAW_WRITE_WRITE;
+ wr.write.in.file.fnum = fnum;
+ wr.write.in.count = 1;
+ wr.write.in.offset = 0;
+ wr.write.in.remaining = 0;
+ wr.write.in.data = (const uint8_t *)"x";
+ status = smb_raw_write(cli1->tree, &wr);
+ CHECK_STATUS(tctx, status, NT_STATUS_OK);
+ }
+
smbcli_oplock_handler(cli2->transport, oplock_handler_ack_to_given, cli2->tree);
io.ntcreatex.in.flags = NTCREATEX_FLAGS_EXTENDED |