s4:torture:smb2: display share capabilities
authorGregor Beck <gbeck@sernet.de>
Thu, 22 Aug 2013 10:05:56 +0000 (12:05 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 9 May 2014 10:58:19 +0000 (12:58 +0200)
source4/torture/smb2/durable_v2_open.c

index 38d5af9b81035e5b7fcdddcc8b45fef9ced93269..2cfa2427d0ef3d12350a39724b04a0653653e075 100644 (file)
@@ -326,10 +326,17 @@ bool test_durable_v2_open_oplock(struct torture_context *tctx,
        bool ret;
        char fname[256];
 
+       uint32_t share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli);
+       uint32_t server_capabilities = smb2cli_conn_server_capabilities(tree->session->transport->conn);
+
+       torture_comment(tctx, "server capabilities: 0x%08x\n", server_capabilities);
+       torture_comment(tctx, "share capabilities: 0x%08x\n", share_capabilities);
+
        /* Choose a random name in case the state is left a little funky. */
        snprintf(fname, 256, "durable_open_oplock_%s.dat",
                 generate_random_str(tctx, 8));
 
+
        ret = test_durable_v2_open_oplock_table(tctx, tree, fname,
                                                false, /* request_persistent */
                                                durable_open_vs_oplock_table,
@@ -496,6 +503,7 @@ bool test_durable_v2_open_lease(struct torture_context *tctx,
        char fname[256];
        bool ret = true;
        uint32_t caps;
+       uint32_t share_capabilities;
 
        caps = smb2cli_conn_server_capabilities(tree->session->transport->conn);
        if (!(caps & SMB2_CAP_LEASING)) {
@@ -505,6 +513,9 @@ bool test_durable_v2_open_lease(struct torture_context *tctx,
        /* Choose a random name in case the state is left a little funky. */
        snprintf(fname, 256, "durable_open_lease_%s.dat", generate_random_str(tctx, 8));
 
+       share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli);
+       torture_comment(tctx, "open_lease: capabilities 0x%08x\n", share_capabilities);
+
        ret = test_durable_v2_open_lease_table(tctx, tree, fname,
                                               false, /* request_persistent */
                                               durable_open_vs_lease_table,
@@ -1663,6 +1674,7 @@ bool test_persistent_open_oplock(struct torture_context *tctx,
        share_is_ca = share_capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
 
        torture_comment(tctx, "persistent_open_oplock: share is%s CA\n", share_is_ca ? "" : " not");
+       torture_comment(tctx, "persistent_open_oplock: capabilities 0x%08x\n", share_capabilities);
 
        if (share_is_ca) {
                table = persistent_open_oplock_ca_table;
@@ -1757,7 +1769,8 @@ bool test_persistent_open_lease(struct torture_context *tctx,
        share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli);
        share_is_ca = share_capabilities & SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
 
-       torture_comment(tctx, "persistent_open_lease: share is%s CA\n", share_is_ca ? "" : " not");
+       torture_comment(tctx, "server capabilities 0x%08x\n", caps);
+       torture_comment(tctx, "share capabilities 0x%08x\n", share_capabilities);
 
        if (share_is_ca) {
                table = persistent_open_lease_ca_table;