s4:torture/smb2: s/smb2cli_lock/test_smb2_lock
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Jul 2011 15:52:33 +0000 (17:52 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 6 Jul 2011 15:54:47 +0000 (17:54 +0200)
metze

source4/torture/smb2/lock.c

index fe8281334593e57d6236621546f513f4951eb7a9..078143e91bd29d5c50fde0b1463847d3eefcb64c 100644 (file)
@@ -2608,8 +2608,8 @@ done:
        return ret;
 }
 
-static NTSTATUS smb2cli_lock(struct smb2_tree *tree, struct smb2_handle h,
-                            uint64_t offset, uint64_t length, bool exclusive)
+static NTSTATUS test_smb2_lock(struct smb2_tree *tree, struct smb2_handle h,
+                              uint64_t offset, uint64_t length, bool exclusive)
 {
        struct smb2_lock lck;
        struct smb2_lock_element el[1];
@@ -2693,44 +2693,44 @@ static bool test_overlap(struct torture_context *torture,
 
        torture_comment(torture, "Testing overlapping locks:\n");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 0, 4, true)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h, 2, 4, true));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 0, 4, true)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h, 2, 4, true));
        EXPECTED(ret, false);
        torture_comment(torture, "the same session/handle %s set overlapping "
                                 "exclusive locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 10, 4, false)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h, 12, 4, false));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 10, 4, false)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h, 12, 4, false));
        EXPECTED(ret, true);
        torture_comment(torture, "the same session/handle %s set overlapping "
                                 "shared locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 20, 4, true)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree2, h3, 22, 4, true));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 20, 4, true)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree2, h3, 22, 4, true));
        EXPECTED(ret, false);
        torture_comment(torture, "a different session %s set overlapping "
                                 "exclusive locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 30, 4, false)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree2, h3, 32, 4, false));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 30, 4, false)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree2, h3, 32, 4, false));
        EXPECTED(ret, true);
        torture_comment(torture, "a different session %s set overlapping "
                                 "shared locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 40, 4, true)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h2, 42, 4, true));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 40, 4, true)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h2, 42, 4, true));
        EXPECTED(ret, false);
        torture_comment(torture, "a different handle %s set overlapping "
                                 "exclusive locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 50, 4, false)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h2, 52, 4, false));
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 50, 4, false)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h2, 52, 4, false));
        EXPECTED(ret, true);
        torture_comment(torture, "a different handle %s set overlapping "
                                 "shared locks\n", ret?"can":"cannot");
 
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 110, 4, false)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h, 112, 4, false)) &&
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 110, 4, false)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h, 112, 4, false)) &&
              NT_STATUS_IS_OK(smb2cli_unlock(tree, h, 110, 6));
        EXPECTED(ret, false);
        torture_comment(torture, "the same handle %s coalesce read locks\n",
@@ -2742,11 +2742,11 @@ static bool test_overlap(struct torture_context *torture,
        CHECK_STATUS(status, NT_STATUS_OK);
        status = torture_smb2_testfile(tree, fname, &h2);
        CHECK_STATUS(status, NT_STATUS_OK);
-       ret = NT_STATUS_IS_OK(smb2cli_lock(tree, h, 0, 8, false)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h2, 0, 1, false)) &&
+       ret = NT_STATUS_IS_OK(test_smb2_lock(tree, h, 0, 8, false)) &&
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h2, 0, 1, false)) &&
              NT_STATUS_IS_OK(smb2_util_close(tree, h)) &&
              NT_STATUS_IS_OK(torture_smb2_testfile(tree, fname, &h)) &&
-             NT_STATUS_IS_OK(smb2cli_lock(tree, h, 7, 1, true));
+             NT_STATUS_IS_OK(test_smb2_lock(tree, h, 7, 1, true));
        EXPECTED(ret, true);
        torture_comment(torture, "the server %s have the NT byte range lock "
                                 "bug\n", !ret?"does":"doesn't");