torture: Extend raw.oplock.batch10
authorVolker Lendecke <vl@samba.org>
Mon, 9 Sep 2013 18:53:15 +0000 (18:53 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 14 Oct 2013 23:52:29 +0000 (01:52 +0200)
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>
source4/torture/raw/oplock.c

index b4aac1154b77afc5f2fcab064834cf1fdec80b93..34e270d82591dab666f79b27039e09208b0e0ef0 100644 (file)
@@ -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 |