summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-07-06 17:52:33 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-06 17:54:47 +0200
commit43c865a38e534ec6f01643f9609cbccd9de976f8 (patch)
tree2071c9272b03462fca80217d8d0db6dac139c91f
parent8a2290667ca4c530321d366d3dd09f4757e9ac1d (diff)
downloadsamba-43c865a38e534ec6f01643f9609cbccd9de976f8.tar.gz
samba-43c865a38e534ec6f01643f9609cbccd9de976f8.tar.bz2
samba-43c865a38e534ec6f01643f9609cbccd9de976f8.zip
s4:torture/smb2: s/smb2cli_lock/test_smb2_lock
metze
-rw-r--r--source4/torture/smb2/lock.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source4/torture/smb2/lock.c b/source4/torture/smb2/lock.c
index fe82813345..078143e91b 100644
--- a/source4/torture/smb2/lock.c
+++ b/source4/torture/smb2/lock.c
@@ -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");