summaryrefslogtreecommitdiff
path: root/source4/torture/mangle_test.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
committerTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
commit4639eb5a58f8c0906afdc8e8f8f67f82e9547f75 (patch)
tree2115d25166961cea7d49836d53a05e98c796ff8a /source4/torture/mangle_test.c
parentf0c9a54b30cfa627b4ddcbc24fe943b21472df34 (diff)
downloadsamba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.gz
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.bz2
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.zip
Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface. Part 2 will be to eliminate cli_state from smbtorture as this is now the only place where it is used. (This used to be commit db1cc96af62ea42837d60592877fc3f93cef143b)
Diffstat (limited to 'source4/torture/mangle_test.c')
-rw-r--r--source4/torture/mangle_test.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source4/torture/mangle_test.c b/source4/torture/mangle_test.c
index de0a7f6a14..f0aaee18ec 100644
--- a/source4/torture/mangle_test.c
+++ b/source4/torture/mangle_test.c
@@ -36,48 +36,48 @@ static BOOL test_one(struct cli_state *cli, const char *name)
total++;
- fnum = cli_open(cli, name, O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
+ fnum = cli_open(cli->tree, name, O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
if (fnum == -1) {
- printf("open of %s failed (%s)\n", name, cli_errstr(cli));
+ printf("open of %s failed (%s)\n", name, cli_errstr(cli->tree));
return False;
}
- if (!cli_close(cli, fnum)) {
- printf("close of %s failed (%s)\n", name, cli_errstr(cli));
+ if (!cli_close(cli->tree, fnum)) {
+ printf("close of %s failed (%s)\n", name, cli_errstr(cli->tree));
return False;
}
/* get the short name */
- status = cli_qpathinfo_alt_name(cli, name, &shortname);
+ status = cli_qpathinfo_alt_name(cli->tree, name, &shortname);
if (!NT_STATUS_IS_OK(status)) {
- printf("query altname of %s failed (%s)\n", name, cli_errstr(cli));
+ printf("query altname of %s failed (%s)\n", name, cli_errstr(cli->tree));
return False;
}
snprintf(name2, sizeof(name2), "\\mangle_test\\%s", shortname);
- if (!cli_unlink(cli, name2)) {
+ if (!cli_unlink(cli->tree, name2)) {
printf("unlink of %s (%s) failed (%s)\n",
- name2, name, cli_errstr(cli));
+ name2, name, cli_errstr(cli->tree));
return False;
}
/* recreate by short name */
- fnum = cli_open(cli, name2, O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
+ fnum = cli_open(cli->tree, name2, O_RDWR|O_CREAT|O_EXCL, DENY_NONE);
if (fnum == -1) {
- printf("open2 of %s failed (%s)\n", name2, cli_errstr(cli));
+ printf("open2 of %s failed (%s)\n", name2, cli_errstr(cli->tree));
return False;
}
- if (!cli_close(cli, fnum)) {
- printf("close of %s failed (%s)\n", name, cli_errstr(cli));
+ if (!cli_close(cli->tree, fnum)) {
+ printf("close of %s failed (%s)\n", name, cli_errstr(cli->tree));
return False;
}
/* and unlink by long name */
- if (!cli_unlink(cli, name)) {
+ if (!cli_unlink(cli->tree, name)) {
printf("unlink2 of %s (%s) failed (%s)\n",
- name, name2, cli_errstr(cli));
+ name, name2, cli_errstr(cli->tree));
failures++;
- cli_unlink(cli, name2);
+ cli_unlink(cli->tree, name2);
return True;
}
@@ -167,10 +167,10 @@ BOOL torture_mangle(int dummy)
return False;
}
- cli_unlink(cli, "\\mangle_test\\*");
- cli_rmdir(cli, "\\mangle_test");
+ cli_unlink(cli->tree, "\\mangle_test\\*");
+ cli_rmdir(cli->tree, "\\mangle_test");
- if (!cli_mkdir(cli, "\\mangle_test")) {
+ if (!cli_mkdir(cli->tree, "\\mangle_test")) {
printf("ERROR: Failed to make directory\n");
return False;
}
@@ -189,8 +189,8 @@ BOOL torture_mangle(int dummy)
}
}
- cli_unlink(cli, "\\mangle_test\\*");
- if (!cli_rmdir(cli, "\\mangle_test")) {
+ cli_unlink(cli->tree, "\\mangle_test\\*");
+ if (!cli_rmdir(cli->tree, "\\mangle_test")) {
printf("ERROR: Failed to remove directory\n");
return False;
}