summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-18 12:39:35 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-18 23:27:52 +0200
commitb0faf0bd26b275719bf44f742feed11d5acccde3 (patch)
tree052891442bc497c6014cf2cdd103c0889b285e49
parentdf09511cf2d4462384b85ef0d0a82e059a93d4c5 (diff)
downloadsamba-b0faf0bd26b275719bf44f742feed11d5acccde3.tar.gz
samba-b0faf0bd26b275719bf44f742feed11d5acccde3.tar.bz2
samba-b0faf0bd26b275719bf44f742feed11d5acccde3.zip
s3-torture: run_locktest3(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/torture/torture.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index d40d5aa26c..1338ce030a 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1797,17 +1797,20 @@ static bool run_locktest3(int dummy)
for (offset=i=0;i<torture_numops;i++) {
NEXT_OFFSET;
- if (!cli_lock(cli1, fnum1, offset-1, 1, 0, WRITE_LOCK)) {
+
+ status = cli_lock32(cli1, fnum1, offset-1, 1, 0, WRITE_LOCK);
+ if (!NT_STATUS_IS_OK(status)) {
printf("lock1 %d failed (%s)\n",
i,
- cli_errstr(cli1));
+ nt_errstr(status));
return False;
}
- if (!cli_lock(cli2, fnum2, offset-2, 1, 0, WRITE_LOCK)) {
+ status = cli_lock32(cli2, fnum2, offset-2, 1, 0, WRITE_LOCK);
+ if (!NT_STATUS_IS_OK(status)) {
printf("lock2 %d failed (%s)\n",
i,
- cli_errstr(cli1));
+ nt_errstr(status));
return False;
}
}
@@ -1815,22 +1818,26 @@ static bool run_locktest3(int dummy)
for (offset=i=0;i<torture_numops;i++) {
NEXT_OFFSET;
- if (cli_lock(cli1, fnum1, offset-2, 1, 0, WRITE_LOCK)) {
+ status = cli_lock32(cli1, fnum1, offset-2, 1, 0, WRITE_LOCK);
+ if (NT_STATUS_IS_OK(status)) {
printf("error: lock1 %d succeeded!\n", i);
return False;
}
- if (cli_lock(cli2, fnum2, offset-1, 1, 0, WRITE_LOCK)) {
+ status = cli_lock32(cli2, fnum2, offset-1, 1, 0, WRITE_LOCK);
+ if (NT_STATUS_IS_OK(status)) {
printf("error: lock2 %d succeeded!\n", i);
return False;
}
- if (cli_lock(cli1, fnum1, offset-1, 1, 0, WRITE_LOCK)) {
+ status = cli_lock32(cli1, fnum1, offset-1, 1, 0, WRITE_LOCK);
+ if (NT_STATUS_IS_OK(status)) {
printf("error: lock3 %d succeeded!\n", i);
return False;
}
- if (cli_lock(cli2, fnum2, offset-2, 1, 0, WRITE_LOCK)) {
+ status = cli_lock32(cli2, fnum2, offset-2, 1, 0, WRITE_LOCK);
+ if (NT_STATUS_IS_OK(status)) {
printf("error: lock4 %d succeeded!\n", i);
return False;
}