summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-07 15:08:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:27 -0500
commitcd962355abad90a2161765a7be7d26e63572cab7 (patch)
tree21a1e180cfa6396c491301e3e171d8105208bb44 /source4/torture/basic
parent6c79213eb80283bb211d2e2161c25337c0a549b7 (diff)
downloadsamba-cd962355abad90a2161765a7be7d26e63572cab7.tar.gz
samba-cd962355abad90a2161765a7be7d26e63572cab7.tar.bz2
samba-cd962355abad90a2161765a7be7d26e63572cab7.zip
r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/aliases.c4
-rw-r--r--source4/torture/basic/attr.c4
-rw-r--r--source4/torture/basic/base.c4
-rw-r--r--source4/torture/basic/denytest.c29
-rw-r--r--source4/torture/basic/dir.c8
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/basic/locking.c5
-rw-r--r--source4/torture/basic/mangle_test.c4
-rw-r--r--source4/torture/basic/properties.c4
-rw-r--r--source4/torture/basic/rename.c4
-rw-r--r--source4/torture/basic/unlink.c2
11 files changed, 35 insertions, 35 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 0b5f1fb88a..660009704b 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -381,9 +381,9 @@ 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 *torture_trans2_aliases(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "ALIASES");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, "ALIASES");
torture_suite_add_1smb_test(suite, "QFILEINFO aliases", qfsinfo_aliases);
torture_suite_add_1smb_test(suite, "QFSINFO aliases", qfileinfo_aliases);
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index 4c6a7a3ab6..07071bb68a 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -86,8 +86,8 @@ static const struct trunc_open_results attr_results[] = {
};
-BOOL torture_openattrtest(struct torture_context *tctx,
- struct smbcli_state *cli1)
+bool torture_openattrtest(struct torture_context *tctx,
+ struct smbcli_state *cli1)
{
const char *fname = "\\openattr.file";
int fnum1;
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 2cb0c6a985..8c510efab4 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1715,7 +1715,7 @@ NTSTATUS torture_base_init(void)
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "BASE");
torture_suite_add_2smb_test(suite, "FDPASS", run_fdpasstest);
- torture_suite_add_suite(suite, torture_base_locktest());
+ torture_suite_add_suite(suite, torture_base_locktest(suite));
torture_suite_add_1smb_test(suite, "UNLINK", torture_unlinktest);
torture_suite_add_1smb_test(suite, "ATTR", run_attrtest);
torture_suite_add_1smb_test(suite, "TRANS2", run_trans2test);
@@ -1750,7 +1750,7 @@ NTSTATUS torture_base_init(void)
torture_suite_add_1smb_test(suite, "CASETABLE", torture_casetable);
torture_suite_add_1smb_test(suite, "UTABLE", torture_utable);
torture_suite_add_simple_test(suite, "SMB", torture_smb_scan);
- torture_suite_add_suite(suite, torture_trans2_aliases());
+ torture_suite_add_suite(suite, torture_trans2_aliases(suite));
torture_suite_add_1smb_test(suite, "TRANS2-SCAN", torture_trans2_scan);
torture_suite_add_1smb_test(suite, "NTTRANS", torture_nttrans_scan);
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 98f4323ce6..05c613d647 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1410,8 +1410,8 @@ static void progress_bar(struct torture_context *tctx, uint_t i, uint_t total)
/*
this produces a matrix of deny mode behaviour for 1 connection
*/
-BOOL torture_denytest1(struct torture_context *tctx,
- struct smbcli_state *cli1)
+bool torture_denytest1(struct torture_context *tctx,
+ struct smbcli_state *cli1)
{
int fnum1, fnum2;
int i;
@@ -1500,9 +1500,9 @@ failed:
/*
this produces a matrix of deny mode behaviour with 2 connections
*/
-BOOL torture_denytest2(struct torture_context *tctx,
- struct smbcli_state *cli1,
- struct smbcli_state *cli2)
+bool torture_denytest2(struct torture_context *tctx,
+ struct smbcli_state *cli1,
+ struct smbcli_state *cli2)
{
int fnum1, fnum2;
int i;
@@ -1588,9 +1588,9 @@ failed:
/*
simple test harness for playing with deny modes
*/
-BOOL torture_denytest3(struct torture_context *tctx,
- struct smbcli_state *cli1,
- struct smbcli_state *cli2)
+bool torture_denytest3(struct torture_context *tctx,
+ struct smbcli_state *cli1,
+ struct smbcli_state *cli2)
{
int fnum1, fnum2;
const char *fname;
@@ -1889,7 +1889,8 @@ failed:
/*
a denytest for ntcreatex
*/
-BOOL torture_ntdenytest1(struct torture_context *tctx, struct smbcli_state *cli, int client)
+bool torture_ntdenytest1(struct torture_context *tctx,
+ struct smbcli_state *cli, int client)
{
extern int torture_seed;
@@ -1903,9 +1904,9 @@ BOOL torture_ntdenytest1(struct torture_context *tctx, struct smbcli_state *cli,
/*
a denytest for ntcreatex
*/
-BOOL torture_ntdenytest2(struct torture_context *torture,
- struct smbcli_state *cli1,
- struct smbcli_state *cli2)
+bool torture_ntdenytest2(struct torture_context *torture,
+ struct smbcli_state *cli1,
+ struct smbcli_state *cli2)
{
return torture_ntdenytest(torture, cli1, cli2, 0);
}
@@ -1929,8 +1930,8 @@ BOOL torture_ntdenytest2(struct torture_context *torture,
/*
test sharing of handles with DENY_DOS on a single connection
*/
-BOOL torture_denydos_sharing(struct torture_context *tctx,
- struct smbcli_state *cli)
+bool torture_denydos_sharing(struct torture_context *tctx,
+ struct smbcli_state *cli)
{
union smb_open io;
union smb_fileinfo finfo;
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index 8b37188299..9f9122fe32 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -33,8 +33,8 @@ static void list_fn(struct clilist_file_info *finfo, const char *name, void *sta
/*
test directory listing speed
*/
-BOOL torture_dirtest1(struct torture_context *tctx,
- struct smbcli_state *cli)
+bool torture_dirtest1(struct torture_context *tctx,
+ struct smbcli_state *cli)
{
int i;
int fnum;
@@ -76,8 +76,8 @@ BOOL torture_dirtest1(struct torture_context *tctx,
return correct;
}
-BOOL torture_dirtest2(struct torture_context *tctx,
- struct smbcli_state *cli)
+bool torture_dirtest2(struct torture_context *tctx,
+ struct smbcli_state *cli)
{
int i;
int fnum, num_seen;
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index e05e3ef082..1dab4b0cae 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -126,7 +126,7 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/*
basic testing of disconnects
*/
-BOOL torture_disconnect(struct torture_context *torture)
+bool torture_disconnect(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index aa3168fb08..0d66ecf30b 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -795,10 +795,9 @@ fail:
return correct;
}
-struct torture_suite *torture_base_locktest(void)
+struct torture_suite *torture_base_locktest(TALLOC_CTX *mem_ctx)
{
- struct torture_suite *suite = torture_suite_create(talloc_autofree_context(),
- "LOCK");
+ struct torture_suite *suite = torture_suite_create(mem_ctx, "LOCK");
torture_suite_add_2smb_test(suite, "LOCK1", torture_locktest1);
torture_suite_add_1smb_test(suite, "LOCK2", torture_locktest2);
torture_suite_add_2smb_test(suite, "LOCK3", torture_locktest3);
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 665360fc64..d13450dd3a 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -155,8 +155,8 @@ static void gen_name(char *name)
}
-BOOL torture_mangle(struct torture_context *torture,
- struct smbcli_state *cli)
+bool torture_mangle(struct torture_context *torture,
+ struct smbcli_state *cli)
{
extern int torture_numops;
int i;
diff --git a/source4/torture/basic/properties.c b/source4/torture/basic/properties.c
index 6a8e84cc2f..f389fa35f9 100644
--- a/source4/torture/basic/properties.c
+++ b/source4/torture/basic/properties.c
@@ -88,8 +88,8 @@ static void show_bits(const struct bitmapping *bm, uint32_t value)
/*
print out server properties
*/
-BOOL torture_test_properties(struct torture_context *torture,
- struct smbcli_state *cli)
+bool torture_test_properties(struct torture_context *torture,
+ struct smbcli_state *cli)
{
BOOL correct = True;
union smb_fsinfo fs;
diff --git a/source4/torture/basic/rename.c b/source4/torture/basic/rename.c
index 572048e0ea..12fd5e1c99 100644
--- a/source4/torture/basic/rename.c
+++ b/source4/torture/basic/rename.c
@@ -27,8 +27,8 @@
/*
Test rename on files open with share delete and no share delete.
*/
-BOOL torture_test_rename(struct torture_context *tctx,
- struct smbcli_state *cli1)
+bool torture_test_rename(struct torture_context *tctx,
+ struct smbcli_state *cli1)
{
const char *fname = "\\test.txt";
const char *fname1 = "\\test1.txt";
diff --git a/source4/torture/basic/unlink.c b/source4/torture/basic/unlink.c
index 60d5a1554d..bb829051a2 100644
--- a/source4/torture/basic/unlink.c
+++ b/source4/torture/basic/unlink.c
@@ -33,7 +33,7 @@
1) the server does not allow an unlink on a file that is open
*/
-BOOL torture_unlinktest(struct torture_context *tctx, struct smbcli_state *cli)
+bool torture_unlinktest(struct torture_context *tctx, struct smbcli_state *cli)
{
const char *fname = BASEDIR "\\unlink.tst";
int fnum;