diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-28 12:54:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:00 -0500 |
commit | 919aa6b27e5fe49b70c814210aa026c19be66e8a (patch) | |
tree | 4f1cff79459133a014a32e3f42fa787c7d83de67 /source4/torture/raw/qfsinfo.c | |
parent | b42691ee167415c7dc89d50b4ba18909bacd40c1 (diff) | |
download | samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.gz samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.xz 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.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c index 982f348cd5a..dc09e55b639 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; } |