s4:torture:smb2: durable_v2_open_oplock be verbose on failure
authorGregor Beck <gbeck@sernet.de>
Thu, 30 May 2013 08:26:38 +0000 (10:26 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 9 May 2014 10:58:16 +0000 (12:58 +0200)
source4/torture/smb2/durable_v2_open.c

index a0e41068aa4cfa281b60eed9d9745472a5541fd3..92089bbf09e1e37ba8f8a681de36abeb0845be35 100644 (file)
@@ -259,9 +259,6 @@ static bool test_one_durable_v2_open_oplock(struct torture_context *tctx,
        bool ret = true;
        struct smb2_create io;
 
-       torture_comment(tctx, "one_durable_v2_open_oplock: %s %spersistent level: %s shm: %s durable: %d persistent: %d\n",
-                       fname, request_persistent ? "" : "non", test.level, test.share_mode, test.durable, test.persistent);
-
        smb2_util_unlink(tree, fname);
 
        smb2_oplock_create_share(&io, fname,
@@ -283,6 +280,10 @@ static bool test_one_durable_v2_open_oplock(struct torture_context *tctx,
        CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level(test.level));
 
 done:
+       if (!ret) { // || verbose
+         torture_comment(tctx, "one_durable_v2_open_oplock: %s %spersistent level: %s shm: %s durable: %d persistent: %d\n",
+                         fname, request_persistent ? "" : "non", test.level, test.share_mode, test.durable, test.persistent);
+       }
        if (h != NULL) {
                smb2_util_close(tree, *h);
        }