summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-07-19 16:15:52 +0200
committerStefan Metzmacher <metze@samba.org>2011-07-20 23:22:09 +0200
commitd622cadd34e268a7348cb1c06b3e3ca01013a0bf (patch)
treedef37b8e7736cad4ed34ec406e0102f834dae74a /source3
parentc53e2ad4de17a7f7ddaa80d79dfe99e3578c2ab7 (diff)
downloadsamba-d622cadd34e268a7348cb1c06b3e3ca01013a0bf.tar.gz
samba-d622cadd34e268a7348cb1c06b3e3ca01013a0bf.tar.bz2
samba-d622cadd34e268a7348cb1c06b3e3ca01013a0bf.zip
s3-torture: run_simple_posix_open_test(): replace cli_read_old() with
cli_read() Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Jul 20 23:22:09 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/torture.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 83873675c8..6317d0eae6 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5276,6 +5276,7 @@ static bool run_simple_posix_open_test(int dummy)
SMB_STRUCT_STAT sbuf;
bool correct = false;
NTSTATUS status;
+ size_t nread;
printf("Starting simple POSIX open test\n");
@@ -5495,8 +5496,14 @@ static bool run_simple_posix_open_test(int dummy)
goto out;
}
- if (cli_read_old(cli1, fnum1, buf, 0, 10) != 10) {
- printf("POSIX read of %s failed (%s)\n", hname, cli_errstr(cli1));
+ status = cli_read(cli1, fnum1, buf, 0, 10, &nread);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("POSIX read of %s failed (%s)\n", hname,
+ nt_errstr(status));
+ goto out;
+ } else if (nread != 10) {
+ printf("POSIX read of %s failed. Received %ld, expected %d\n",
+ hname, (unsigned long)nread, 10);
goto out;
}