summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-26 12:02:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:54 -0500
commit8c62b4c95163e7e1fc5a8bd600090efdba13d6b5 (patch)
tree0eea010629e2e3f162f0cbc1ef206ec46f1a84ca /source4/torture
parent815d3f2e687cb9e250dc3ce1251e7172522de574 (diff)
downloadsamba-8c62b4c95163e7e1fc5a8bd600090efdba13d6b5.tar.gz
samba-8c62b4c95163e7e1fc5a8bd600090efdba13d6b5.tar.bz2
samba-8c62b4c95163e7e1fc5a8bd600090efdba13d6b5.zip
r21539: try to get rid of all valgrind warnings...
metze (This used to be commit 21f0e8e16373662f5662957e80c1f26f489f6279)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/aliases.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index d90ced213a..bf052cf5cc 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -84,8 +84,7 @@ static bool gen_aliases(struct torture_context *tctx,
}
/* look for qfsinfo aliases */
-static bool qfsinfo_aliases(struct torture_context *tctx,
- struct smbcli_state *cli)
+static bool qfsinfo_aliases(struct torture_context *tctx, struct smbcli_state *cli)
{
struct smb_trans2 t2;
uint16_t setup = TRANSACT2_QFSINFO;
@@ -97,15 +96,15 @@ static bool qfsinfo_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob(NULL, 2);
+ t2.in.params = data_blob_talloc_zero(tctx, 2);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
return gen_aliases(tctx, cli, &t2, 0);
}
/* look for qfileinfo aliases */
-static bool qfileinfo_aliases(struct torture_context *tctx,
- struct smbcli_state *cli)
+static bool qfileinfo_aliases(struct torture_context *tctx, struct smbcli_state *cli)
{
struct smb_trans2 t2;
uint16_t setup = TRANSACT2_QFILEINFO;
@@ -119,8 +118,9 @@ static bool qfileinfo_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob(NULL, 4);
+ t2.in.params = data_blob_talloc_zero(tctx, 4);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
smbcli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, cli, fname);
@@ -143,15 +143,13 @@ static bool qfileinfo_aliases(struct torture_context *tctx,
/* look for qpathinfo aliases */
-static bool qpathinfo_aliases(struct torture_context *tctx,
- struct smbcli_state *cli)
+static bool qpathinfo_aliases(struct torture_context *tctx, struct smbcli_state *cli)
{
struct smb_trans2 t2;
uint16_t setup = TRANSACT2_QPATHINFO;
const char *fname = "\\qpathinfo_aliases.txt";
int fnum;
- ZERO_STRUCT(t2);
t2.in.max_param = 2;
t2.in.max_data = smb_raw_max_trans_data(cli->tree, 2);
t2.in.max_setup = 0;
@@ -159,8 +157,9 @@ static bool qpathinfo_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob_talloc(tctx, NULL, 6);
+ t2.in.params = data_blob_talloc_zero(tctx, 6);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
smbcli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, cli, fname);
@@ -186,8 +185,7 @@ static bool qpathinfo_aliases(struct torture_context *tctx,
/* look for trans2 findfirst aliases */
-static bool findfirst_aliases(struct torture_context *tctx,
- struct smbcli_state *cli)
+static bool findfirst_aliases(struct torture_context *tctx, struct smbcli_state *cli)
{
struct smb_trans2 t2;
uint16_t setup = TRANSACT2_FINDFIRST;
@@ -201,8 +199,9 @@ static bool findfirst_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob_talloc(tctx, NULL, 12);
+ t2.in.params = data_blob_talloc_zero(tctx, 12);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
smbcli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, cli, fname);
@@ -300,8 +299,7 @@ static bool gen_set_aliases(struct torture_context *tctx,
/* look for setfileinfo aliases */
-static bool setfileinfo_aliases(struct torture_context *tctx,
- struct smbcli_state *cli)
+static bool setfileinfo_aliases(struct torture_context *tctx, struct smbcli_state *cli)
{
struct smb_trans2 t2;
uint16_t setup = TRANSACT2_SETFILEINFO;
@@ -315,8 +313,9 @@ static bool setfileinfo_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob(NULL, 6);
+ t2.in.params = data_blob_talloc_zero(tctx, 6);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
smbcli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, cli, fname);
@@ -353,8 +352,9 @@ static bool setpathinfo_aliases(struct torture_context *tctx,
t2.in.timeout = 0;
t2.in.setup_count = 1;
t2.in.setup = &setup;
- t2.in.params = data_blob_talloc(tctx, NULL, 4);
+ t2.in.params = data_blob_talloc_zero(tctx, 4);
t2.in.data = data_blob(NULL, 0);
+ ZERO_STRUCT(t2.out);
smbcli_unlink(cli->tree, fname);
@@ -384,19 +384,14 @@ static bool setpathinfo_aliases(struct torture_context *tctx,
/* look for aliased info levels in trans2 calls */
struct torture_suite *torture_trans2_aliases(void)
{
- struct torture_suite *suite = torture_suite_create(
- talloc_autofree_context(),
- "ALIASES");
+ struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "ALIASES");
- torture_suite_add_1smb_test(suite, "QFILEINFO aliases",
- qfsinfo_aliases);
+ torture_suite_add_1smb_test(suite, "QFILEINFO aliases", qfsinfo_aliases);
torture_suite_add_1smb_test(suite, "QFSINFO aliases", qfileinfo_aliases);
torture_suite_add_1smb_test(suite, "QPATHINFO aliases", qpathinfo_aliases);
torture_suite_add_1smb_test(suite, "FINDFIRST aliases", findfirst_aliases);
- torture_suite_add_1smb_test(suite, "setfileinfo_aliases",
- setfileinfo_aliases);
- torture_suite_add_1smb_test(suite, "setpathinfo_aliases",
- setpathinfo_aliases);
+ torture_suite_add_1smb_test(suite, "setfileinfo_aliases", setfileinfo_aliases);
+ torture_suite_add_1smb_test(suite, "setpathinfo_aliases", setpathinfo_aliases);
return suite;
}