diff options
Diffstat (limited to 'source4/torture/raw/samba3misc.c')
-rw-r--r-- | source4/torture/raw/samba3misc.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c index 07669ed28b..9a10272aec 100644 --- a/source4/torture/raw/samba3misc.c +++ b/source4/torture/raw/samba3misc.c @@ -37,9 +37,8 @@ } \ } while (0) -bool torture_samba3_checkfsp(struct torture_context *torture) +bool torture_samba3_checkfsp(struct torture_context *torture, struct smbcli_state *cli) { - struct smbcli_state *cli; const char *fname = "test.txt"; const char *dirname = "testdir"; int fnum; @@ -55,14 +54,6 @@ bool torture_samba3_checkfsp(struct torture_context *torture) return false; } - if (!torture_open_connection_share( - torture, &cli, torture, torture_setting_string(torture, "host", NULL), - torture_setting_string(torture, "share", NULL), torture->ev)) { - d_printf("torture_open_connection_share failed\n"); - ret = false; - goto done; - } - smbcli_deltree(cli->tree, dirname); status = torture_second_tcon(torture, cli->session, @@ -154,7 +145,6 @@ bool torture_samba3_checkfsp(struct torture_context *torture) done: smbcli_deltree(cli->tree, dirname); - torture_close_connection(cli); talloc_free(mem_ctx); return ret; @@ -611,9 +601,8 @@ static void count_fn(struct clilist_file_info *info, const char *name, *counter += 1; } -bool torture_samba3_caseinsensitive(struct torture_context *torture) +bool torture_samba3_caseinsensitive(struct torture_context *torture, struct smbcli_state *cli) { - struct smbcli_state *cli; TALLOC_CTX *mem_ctx; NTSTATUS status; const char *dirname = "insensitive"; @@ -629,10 +618,6 @@ bool torture_samba3_caseinsensitive(struct torture_context *torture) return false; } - if (!torture_open_connection(&cli, torture, 0)) { - goto done; - } - smbcli_deltree(cli->tree, dirname); status = smbcli_mkdir(cli->tree, dirname); @@ -710,9 +695,8 @@ static void receive_lock_result(struct smbcli_request *req) * Note: To run this test, use "--option=torture:localdir=<LOCALDIR>" */ -bool torture_samba3_posixtimedlock(struct torture_context *tctx) +bool torture_samba3_posixtimedlock(struct torture_context *tctx, struct smbcli_state *cli) { - struct smbcli_state *cli; NTSTATUS status; bool ret = true; const char *dirname = "posixlock"; @@ -732,11 +716,6 @@ bool torture_samba3_posixtimedlock(struct torture_context *tctx) struct tevent_timer *te; - if (!torture_open_connection(&cli, tctx, 0)) { - ret = false; - goto done; - } - smbcli_deltree(cli->tree, dirname); status = smbcli_mkdir(cli->tree, dirname); @@ -870,20 +849,14 @@ bool torture_samba3_posixtimedlock(struct torture_context *tctx) return ret; } -bool torture_samba3_rootdirfid(struct torture_context *tctx) +bool torture_samba3_rootdirfid(struct torture_context *tctx, struct smbcli_state *cli) { - struct smbcli_state *cli; NTSTATUS status; uint16_t dnum; union smb_open io; const char *fname = "testfile"; bool ret = false; - if (!torture_open_connection(&cli, tctx, 0)) { - ret = false; - goto done; - } - smbcli_unlink(cli->tree, fname); ZERO_STRUCT(io); @@ -942,9 +915,8 @@ bool torture_samba3_rootdirfid(struct torture_context *tctx) return ret; } -bool torture_samba3_oplock_logoff(struct torture_context *tctx) +bool torture_samba3_oplock_logoff(struct torture_context *tctx, struct smbcli_state *cli) { - struct smbcli_state *cli; NTSTATUS status; uint16_t fnum1; union smb_open io; @@ -953,11 +925,6 @@ bool torture_samba3_oplock_logoff(struct torture_context *tctx) struct smbcli_request *req; struct smb_echo echo_req; - if (!torture_open_connection(&cli, tctx, 0)) { - ret = false; - goto done; - } - smbcli_unlink(cli->tree, fname); ZERO_STRUCT(io); |