From 7e9ed052778d22e4d70bed444b226461dced01b6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 30 Apr 2012 14:05:19 +1000 Subject: s4-torture: Move various samba3 tests to the torture_suite_add_1smb_test wrapper --- source4/torture/raw/samba3hide.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'source4/torture/raw/samba3hide.c') diff --git a/source4/torture/raw/samba3hide.c b/source4/torture/raw/samba3hide.c index c3a572c21c..f980ffceb6 100644 --- a/source4/torture/raw/samba3hide.c +++ b/source4/torture/raw/samba3hide.c @@ -154,21 +154,14 @@ static NTSTATUS smbcli_chmod(struct smbcli_tree *tree, const char *fname, return smb_raw_setpathinfo(tree, &sfinfo); } -bool torture_samba3_hide(struct torture_context *torture) +bool torture_samba3_hide(struct torture_context *torture, struct smbcli_state *cli) { - struct smbcli_state *cli; const char *fname = "test.txt"; int fnum; NTSTATUS status; struct smbcli_tree *hideunread; struct smbcli_tree *hideunwrite; - if (!torture_open_connection_share( - torture, &cli, torture, torture_setting_string(torture, "host", NULL), - torture_setting_string(torture, "share", NULL), torture->ev)) { - torture_fail(torture, "torture_open_connection_share failed\n"); - } - status = smbcli_setup_unix(cli->tree); if (!NT_STATUS_IS_OK(status)) { torture_fail(torture, @@ -277,19 +270,14 @@ bool torture_samba3_hide(struct torture_context *torture) * close. smb_close should return NT_STATUS_ACCESS_DENIED. */ -bool torture_samba3_closeerr(struct torture_context *tctx) +bool torture_samba3_closeerr(struct torture_context *tctx, struct smbcli_state *cli) { - struct smbcli_state *cli = NULL; bool result = false; NTSTATUS status; const char *dname = "closeerr.dir"; const char *fname = "closeerr.dir\\closerr.txt"; int fnum; - if (!torture_open_connection(&cli, tctx, 0)) { - goto fail; - } - smbcli_deltree(cli->tree, dname); torture_assert_ntstatus_ok( @@ -334,9 +322,5 @@ bool torture_samba3_closeerr(struct torture_context *tctx) result = true; - fail: - if (cli) { - torture_close_connection(cli); - } return result; } -- cgit