From c92ac4c8eebf4ddaaab4e8b640650406b259b05d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Sep 2013 18:53:15 +0000 Subject: 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 Reviewed-by: Jeremy Allison --- source4/torture/raw/oplock.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4') 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 | -- cgit