summaryrefslogtreecommitdiff
path: root/source4/torture/raw/qfsinfo.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-28 12:54:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:00 -0500
commit919aa6b27e5fe49b70c814210aa026c19be66e8a (patch)
tree4f1cff79459133a014a32e3f42fa787c7d83de67 /source4/torture/raw/qfsinfo.c
parentb42691ee167415c7dc89d50b4ba18909bacd40c1 (diff)
downloadsamba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.gz
samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.bz2
samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.zip
r24735: Use torture API in more places.
(This used to be commit 1319d88c099496be29dd9214fa2492c81e848369)
Diffstat (limited to 'source4/torture/raw/qfsinfo.c')
-rw-r--r--source4/torture/raw/qfsinfo.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index 982f348cd5..dc09e55b63 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -120,26 +120,19 @@ static union smb_fsinfo *find(const char *name)
Some of the consistency tests assume that the target filesystem is
quiescent, which is sometimes hard to achieve
*/
-BOOL torture_raw_qfsinfo(struct torture_context *torture)
+bool torture_raw_qfsinfo(struct torture_context *torture,
+ struct smbcli_state *cli)
{
- struct smbcli_state *cli;
int i;
BOOL ret = True;
int count;
union smb_fsinfo *s1, *s2;
- TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli, 0)) {
- return False;
- }
-
- mem_ctx = talloc_init("torture_qfsinfo");
-
/* scan all the levels, pulling the results */
for (i=0; levels[i].name; i++) {
printf("Running level %s\n", levels[i].name);
levels[i].fsinfo.generic.level = levels[i].level;
- levels[i].status = smb_raw_fsinfo(cli->tree, mem_ctx, &levels[i].fsinfo);
+ levels[i].status = smb_raw_fsinfo(cli->tree, torture, &levels[i].fsinfo);
}
/* check for completely broken levels */
@@ -158,11 +151,10 @@ BOOL torture_raw_qfsinfo(struct torture_context *torture)
}
if (count != 0) {
- ret = False;
printf("%d levels failed\n", count);
if (count > 13) {
printf("too many level failures - giving up\n");
- goto done;
+ return False;
}
}
@@ -303,8 +295,5 @@ BOOL torture_raw_qfsinfo(struct torture_context *torture)
STR_CHECK("ATTRIBUTE_INFO", attribute_info, fs_type, STR_UNICODE);
STR_CHECK("ATTRIBUTE_INFORMATION", attribute_info, fs_type, STR_UNICODE);
-done:
- torture_close_connection(cli);
- talloc_free(mem_ctx);
return ret;
}