summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-22 11:18:30 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-22 17:06:09 +0200
commita560b793ca15738c2f09e4a9c17031c6f467ee5f (patch)
tree47fabf430d96677317ba000c18f40d6b8a1f74c3
parent0986b0bed78c90c2b688cc9d98e5daa8c471cdc2 (diff)
downloadsamba-a560b793ca15738c2f09e4a9c17031c6f467ee5f.tar.gz
samba-a560b793ca15738c2f09e4a9c17031c6f467ee5f.tar.bz2
samba-a560b793ca15738c2f09e4a9c17031c6f467ee5f.zip
s3-torture: run_locktest4(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/torture/torture.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index aa24a18012..c2bc6d2481 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2037,7 +2037,7 @@ static bool run_locktest4(int dummy)
ret = NT_STATUS_IS_OK(cli_lock32(cli1, fnum1, 120, 4, 0, WRITE_LOCK)) &&
- (cli_read_old(cli2, fnum2, buf, 120, 4) == 4);
+ test_cli_read(cli2, fnum2, buf, 120, 4, NULL, 4);
EXPECTED(ret, False);
printf("this server %s strict write locking\n", ret?"doesn't do":"does");
@@ -2063,7 +2063,7 @@ static bool run_locktest4(int dummy)
ret = NT_STATUS_IS_OK(cli_lock32(cli1, fnum1, 150, 4, 0, WRITE_LOCK)) &&
NT_STATUS_IS_OK(cli_lock32(cli1, fnum1, 150, 4, 0, READ_LOCK)) &&
NT_STATUS_IS_OK(cli_unlock(cli1, fnum1, 150, 4)) &&
- (cli_read_old(cli2, fnum2, buf, 150, 4) == 4) &&
+ test_cli_read(cli2, fnum2, buf, 150, 4, NULL, 4) &&
!(NT_STATUS_IS_OK(cli_writeall(cli2, fnum2, 0, (uint8_t *)buf,
150, 4, NULL))) &&
NT_STATUS_IS_OK(cli_unlock(cli1, fnum1, 150, 4));
@@ -2074,7 +2074,7 @@ static bool run_locktest4(int dummy)
NT_STATUS_IS_OK(cli_unlock(cli1, fnum1, 160, 4)) &&
NT_STATUS_IS_OK(cli_writeall(cli2, fnum2, 0, (uint8_t *)buf,
160, 4, NULL)) &&
- (cli_read_old(cli2, fnum2, buf, 160, 4) == 4);
+ test_cli_read(cli2, fnum2, buf, 160, 4, NULL, 4);
EXPECTED(ret, True);
printf("the same process %s remove a read lock using write locking\n", ret?"can":"cannot");
@@ -2082,7 +2082,7 @@ static bool run_locktest4(int dummy)
NT_STATUS_IS_OK(cli_unlock(cli1, fnum1, 170, 4)) &&
NT_STATUS_IS_OK(cli_writeall(cli2, fnum2, 0, (uint8_t *)buf,
170, 4, NULL)) &&
- (cli_read_old(cli2, fnum2, buf, 170, 4) == 4);
+ test_cli_read(cli2, fnum2, buf, 170, 4, NULL, 4);
EXPECTED(ret, True);
printf("the same process %s remove a write lock using read locking\n", ret?"can":"cannot");
@@ -2091,7 +2091,7 @@ static bool run_locktest4(int dummy)
NT_STATUS_IS_OK(cli_unlock(cli1, fnum1, 190, 4)) &&
!NT_STATUS_IS_OK(cli_writeall(cli2, fnum2, 0, (uint8_t *)buf,
190, 4, NULL)) &&
- (cli_read_old(cli2, fnum2, buf, 190, 4) == 4);
+ test_cli_read(cli2, fnum2, buf, 190, 4, NULL, 4);
EXPECTED(ret, True);
printf("the same process %s remove the first lock first\n", ret?"does":"doesn't");