torture: exit early for samba3 with too old protocol in smb2.lock.replay
authorMichael Adam <obnox@samba.org>
Thu, 20 Sep 2018 16:34:22 +0000 (18:34 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 16 Oct 2018 09:41:54 +0000 (11:41 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source4/torture/smb2/lock.c

index 183ee1c116943778c3564b462faaaab688137edb..3681053ec570054da5f1ae248b11f58476cbedff 100644 (file)
@@ -2892,6 +2892,14 @@ static bool test_replay(struct torture_context *torture,
                                required for Lock Replay tests\n");
        }
 
+       if (TARGET_IS_SAMBA3(torture)) {
+               if (smbXcli_conn_protocol(transport->conn) < PROTOCOL_SMB2_22) {
+                       torture_skip(torture, "SMB 2.22 Dialect family or above \
+                                       required for Lock Replay tests against \
+                                       Samba\n");
+               }
+       }
+
        status = torture_smb2_testdir(tree, BASEDIR, &h);
        CHECK_STATUS(status, NT_STATUS_OK);
        smb2_util_close(tree, h);
@@ -2913,16 +2921,8 @@ static bool test_replay(struct torture_context *torture,
                .in.file.handle = h
        };
 
-       if (TARGET_IS_SAMBA3(torture)) {
+       if (!TARGET_IS_SAMBA3(torture)) {
 
-               if (smbXcli_conn_protocol(transport->conn) < PROTOCOL_SMB2_22) {
-                       torture_warning(torture, "SMB 2.22 Dialect family or above \
-                                       required for Lock Replay tests against \
-                                       Samba\n");
-                       goto done;
-               }
-
-       } else {
 
                torture_comment(torture, "Testing Lock Replay detection [ignored]:\n");
                lck.in.lock_sequence = 0x010 + 0x1;