oplock...
authorStefan Metzmacher <metze@samba.org>
Thu, 4 Oct 2012 21:17:48 +0000 (23:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 13 Aug 2018 15:34:53 +0000 (17:34 +0200)
source4/torture/smb2/oplock.c

index 800a4cf299f28459b193db116599dbb2fb3cb5f2..2df803f244de1ccd904ffeaa5f871e9756a6f1e1 100644 (file)
@@ -2620,7 +2620,9 @@ static bool test_smb2_oplock_batch22(struct torture_context *tctx,
        const char *fname = BASEDIR "\\test_batch22.dat";
        NTSTATUS status;
        bool ret = true;
+       struct smb2_request *req1, *req2;
        union smb_open io;
+       union smb_open io2;
        struct smb2_handle h, h1, h2;
        struct timeval tv;
        int timeout = torture_setting_int(tctx, "oplocktimeout", 30);
@@ -2669,7 +2671,12 @@ static bool test_smb2_oplock_batch22(struct torture_context *tctx,
        tv = timeval_current();
        tree1->session->transport->oplock.handler =
                                torture_oplock_handler_timeout;
-       status = smb2_create(tree1, tctx, &(io.smb2));
+       io2 = io;
+       req1 = smb2_create_send(tree1, tctx, &(io.smb2));
+       req2 = smb2_create_send(tree1, tctx, &(io2.smb2));
+       status = smb2_create_recv(req1, tctx, &&(io.smb2);
+       torture_assert_ntstatus_ok(tctx, status, "Incorrect status");
+       status = smb2_create_recv(req2, tctx, &&(io2.smb2);
        torture_assert_ntstatus_ok(tctx, status, "Incorrect status");
        h2 = io.smb2.out.file.handle;
        CHECK_VAL(io.smb2.out.oplock_level, SMB2_OPLOCK_LEVEL_II);