Remove test 2 off test_multichannel_lease_break()
authorSachin Prabhu <sprabhu@redhat.com>
Wed, 14 Feb 2018 11:16:39 +0000 (16:46 +0530)
committerSachin Prabhu <sprabhu@redhat.com>
Tue, 17 Jul 2018 20:46:27 +0000 (21:46 +0100)
Test 1 covers this scenario

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
source4/torture/smb2/multichannel.c

index 0f8678749ca41fe04d9262b435f38d167497db9a..a1d75c17d0414ac5b2e58a21496b2f6b58b360ec 100644 (file)
@@ -1150,129 +1150,6 @@ static bool test_multichannel_lease_break(struct torture_context *tctx,
 
        transport2_options = transport1->options;
 
-       /*
-        * Test 2:
-        *      open file1 in session 2A
-        *      open file2 in session 2B
-        *      open file3 in session 2C
-        *      open file1 in session 1
-        *              lease break sent to 2A
-        *      open file2 in session 2
-        *              lease break sent to 2B
-        */
-       torture_comment(tctx, "Test 2 start \n");
-
-       transport2_options = transport1->options;
-       rval = test_multichannel_create_channels2(tctx, host, share,
-                                                 credentials,
-                                                 &transport2_options,
-                                                 &tree2A, &tree2B, &tree2C);
-       CHECK_VAL(rval, 0);
-       transport2A = tree2A->session->transport;
-       transport2B = tree2B->session->transport;
-       transport2C = tree2C->session->transport;
-
-       /* 2a opens file1 */
-       torture_comment(tctx, "client2 opens fname1 via session 2A\n");
-       smb2_lease_create(&io1, &ls1, false, fname1, LEASE2F1,
-                         smb2_util_lease_state("RHW"));
-       status = smb2_create(tree2A, mem_ctx, &io1);
-       CHECK_STATUS(status, NT_STATUS_OK);
-       h_client2_file1 = io1.out.file.handle;
-       CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
-       CHECK_LEASE(&io1, "RHW", true, LEASE2F1, 0);
-       CHECK_VAL(io1.out.durable_open_v2, false);
-       CHECK_VAL(io1.out.timeout, io1.in.timeout);
-       CHECK_VAL(io1.out.durable_open, false);
-       CHECK_VAL(lease_break_info.count, 0);
-
-       /* 2b opens file2 */
-       torture_comment(tctx, "client2 opens fname2 via session 2B\n");
-       smb2_lease_create(&io2, &ls2, false, fname2, LEASE2F2,
-                         smb2_util_lease_state("RHW"));
-       status = smb2_create(tree2B, mem_ctx, &io2);
-       CHECK_STATUS(status, NT_STATUS_OK);
-       h_client2_file2 = io2.out.file.handle;
-       CHECK_CREATED(&io2, CREATED, FILE_ATTRIBUTE_ARCHIVE);
-       CHECK_LEASE(&io2, "RHW", true, LEASE2F2, 0);
-       CHECK_VAL(io2.out.durable_open_v2, false);
-       CHECK_VAL(io2.out.timeout, io2.in.timeout);
-       CHECK_VAL(io2.out.durable_open, false);
-       CHECK_VAL(lease_break_info.count, 0);
-
-       /* 2c opens file3 */
-       torture_comment(tctx, "client2 opens fname3 via session 2C\n");
-       smb2_lease_create(&io3, &ls3, false, fname3, LEASE2F3,
-                         smb2_util_lease_state("RHW"));
-       status = smb2_create(tree2C, mem_ctx, &io3);
-       CHECK_STATUS(status, NT_STATUS_OK);
-       h_client2_file3 = io3.out.file.handle;
-       CHECK_CREATED(&io3, CREATED, FILE_ATTRIBUTE_ARCHIVE);
-       CHECK_LEASE(&io3, "RHW", true, LEASE2F3, 0);
-       CHECK_VAL(io3.out.durable_open_v2, false);
-       CHECK_VAL(io3.out.timeout, io2.in.timeout);
-       CHECK_VAL(io3.out.durable_open, false);
-       CHECK_VAL(lease_break_info.count, 0);
-
-       /*
-        * 1 opens file1
-        * lease break?
-        */
-
-       torture_comment(tctx, "client1 opens fname1 via session 1\n");
-       smb2_lease_create(&io1, &ls1, false, fname1, LEASE1F1,
-                         smb2_util_lease_state("RHW"));
-       status = smb2_create(tree1, mem_ctx, &io1);
-       CHECK_STATUS(status, NT_STATUS_OK);
-       h_client1_file1 = io1.out.file.handle;
-       CHECK_CREATED(&io1, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
-       CHECK_LEASE(&io1, "RH", true, LEASE1F1, 0);
-       CHECK_BREAK_INFO("RHW", "RH", LEASE2F1);
-       CHECK_VAL(io1.out.durable_open_v2, false);
-       CHECK_VAL(io1.out.timeout, 0);
-       CHECK_VAL(io1.out.durable_open, false);
-       CHECK_VAL(lease_break_info.count, 1);
-       CHECK_PTR(lease_break_info.lease_transport, transport2A);
-
-       torture_reset_lease_break_info(tctx, &lease_break_info);
-
-       /*
-        * 1 opens file2
-        * lease break?
-        */
-
-       torture_comment(tctx, "client1 opens fname2 via session 1\n");
-       smb2_lease_create(&io2, &ls2, false, fname2, LEASE1F2,
-                         smb2_util_lease_state("RHW"));
-       status = smb2_create(tree1, mem_ctx, &io2);
-       CHECK_STATUS(status, NT_STATUS_OK);
-       h_client1_file2 = io2.out.file.handle;
-       CHECK_CREATED(&io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
-       CHECK_LEASE(&io2, "RH", true, LEASE1F2, 0);
-       CHECK_BREAK_INFO("RHW", "RH", LEASE2F2);
-       CHECK_VAL(io2.out.durable_open_v2, false);
-       CHECK_VAL(io2.out.timeout, 0);
-       CHECK_VAL(io2.out.durable_open, false);
-       CHECK_VAL(lease_break_info.count, 1);
-       CHECK_PTR(lease_break_info.lease_transport, transport2A);
-
-       /* cleanup everything */
-       torture_reset_lease_break_info(tctx, &lease_break_info);
-
-       smb2_util_close(tree1, h_client1_file1);
-       smb2_util_close(tree1, h_client1_file2);
-       smb2_util_close(tree1, h_client1_file3);
-       smb2_util_close(tree2A, h_client2_file1);
-       smb2_util_close(tree2A, h_client2_file2);
-       smb2_util_close(tree2A, h_client2_file3);
-
-       smb2_util_unlink(tree1, fname1);
-       smb2_util_unlink(tree1, fname2);
-       smb2_util_unlink(tree1, fname3);
-       CHECK_VAL(lease_break_info.count, 0);
-       test_multichannel_free_channels2(tree2A, tree2B, tree2C);
-       tree2A = tree2B = tree2C = NULL;
-
        /*
         * Test 3:
         *      open file1 in session 2A