summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-25 16:01:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:13 -0500
commit909b111f587705a45f63540b39968f1af58a9b5d (patch)
tree48355b5250c40932b0c5a9dde2e5ade2c3fc29df /source4
parent6c5853aa8d6dfbfeb96d705cbd157544352f810e (diff)
downloadsamba-909b111f587705a45f63540b39968f1af58a9b5d.tar.gz
samba-909b111f587705a45f63540b39968f1af58a9b5d.tar.bz2
samba-909b111f587705a45f63540b39968f1af58a9b5d.zip
r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce29108dd82210dc3e1f00414f545949e1d)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/talloc/testsuite.c8
-rw-r--r--source4/torture/auth/ntlmssp.c3
-rw-r--r--source4/torture/auth/pac.c3
-rw-r--r--source4/torture/basic/aliases.c2
-rw-r--r--source4/torture/basic/attr.c2
-rw-r--r--source4/torture/basic/base.c22
-rw-r--r--source4/torture/basic/charset.c2
-rw-r--r--source4/torture/basic/delaywrite.c2
-rw-r--r--source4/torture/basic/delete.c2
-rw-r--r--source4/torture/basic/denytest.c10
-rw-r--r--source4/torture/basic/dir.c4
-rw-r--r--source4/torture/basic/disconnect.c2
-rw-r--r--source4/torture/basic/locking.c14
-rw-r--r--source4/torture/basic/mangle_test.c2
-rw-r--r--source4/torture/basic/properties.c2
-rw-r--r--source4/torture/basic/rename.c2
-rw-r--r--source4/torture/basic/scanner.c6
-rw-r--r--source4/torture/basic/secleak.c2
-rw-r--r--source4/torture/basic/unlink.c2
-rw-r--r--source4/torture/basic/utable.c4
-rw-r--r--source4/torture/ldap/basic.c3
-rw-r--r--source4/torture/ldap/cldap.c3
-rw-r--r--source4/torture/ldap/cldapbench.c2
-rw-r--r--source4/torture/libnet/domain.c2
-rw-r--r--source4/torture/libnet/libnet_lookup.c7
-rw-r--r--source4/torture/libnet/libnet_rpc.c3
-rw-r--r--source4/torture/libnet/libnet_share.c4
-rw-r--r--source4/torture/libnet/libnet_user.c3
-rw-r--r--source4/torture/libnet/userinfo.c2
-rw-r--r--source4/torture/libnet/userman.c6
-rw-r--r--source4/torture/local/binding_string.c3
-rw-r--r--source4/torture/local/iconv.c4
-rw-r--r--source4/torture/local/idtree.c3
-rw-r--r--source4/torture/local/irpc.c3
-rw-r--r--source4/torture/local/messaging.c3
-rw-r--r--source4/torture/local/ndr.c2
-rw-r--r--source4/torture/local/registry.c3
-rw-r--r--source4/torture/local/resolve.c3
-rw-r--r--source4/torture/local/sddl.c3
-rw-r--r--source4/torture/local/socket.c2
-rw-r--r--source4/torture/local/util_file.c3
-rw-r--r--source4/torture/local/util_strlist.c3
-rw-r--r--source4/torture/nbench/nbench.c2
-rw-r--r--source4/torture/nbt/browse.c3
-rw-r--r--source4/torture/nbt/dgram.c2
-rw-r--r--source4/torture/nbt/query.c3
-rw-r--r--source4/torture/nbt/register.c3
-rw-r--r--source4/torture/nbt/wins.c3
-rw-r--r--source4/torture/nbt/winsbench.c3
-rw-r--r--source4/torture/nbt/winsreplication.c7
-rw-r--r--source4/torture/rap/rap.c5
-rw-r--r--source4/torture/raw/acls.c2
-rw-r--r--source4/torture/raw/chkpath.c2
-rw-r--r--source4/torture/raw/close.c2
-rw-r--r--source4/torture/raw/composite.c2
-rw-r--r--source4/torture/raw/context.c2
-rw-r--r--source4/torture/raw/eas.c4
-rw-r--r--source4/torture/raw/ioctl.c2
-rw-r--r--source4/torture/raw/lock.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/mux.c2
-rw-r--r--source4/torture/raw/notify.c2
-rw-r--r--source4/torture/raw/open.c2
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/raw/qfileinfo.c2
-rw-r--r--source4/torture/raw/qfsinfo.c2
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/raw/rename.c2
-rw-r--r--source4/torture/raw/search.c2
-rw-r--r--source4/torture/raw/seek.c2
-rw-r--r--source4/torture/raw/setfileinfo.c4
-rw-r--r--source4/torture/raw/streams.c2
-rw-r--r--source4/torture/raw/unlink.c2
-rw-r--r--source4/torture/raw/write.c2
-rw-r--r--source4/torture/rpc/alter_context.c2
-rw-r--r--source4/torture/rpc/atsvc.c2
-rw-r--r--source4/torture/rpc/autoidl.c2
-rw-r--r--source4/torture/rpc/bench.c2
-rw-r--r--source4/torture/rpc/bind.c2
-rw-r--r--source4/torture/rpc/countcalls.c2
-rw-r--r--source4/torture/rpc/dfs.c2
-rw-r--r--source4/torture/rpc/drsuapi.c2
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c2
-rw-r--r--source4/torture/rpc/dssetup.c2
-rw-r--r--source4/torture/rpc/dssync.c3
-rw-r--r--source4/torture/rpc/echo.c2
-rw-r--r--source4/torture/rpc/epmapper.c2
-rw-r--r--source4/torture/rpc/eventlog.c2
-rw-r--r--source4/torture/rpc/initshutdown.c2
-rw-r--r--source4/torture/rpc/join.c2
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/rpc/lsa_lookup.c2
-rw-r--r--source4/torture/rpc/mgmt.c2
-rw-r--r--source4/torture/rpc/netlogon.c2
-rw-r--r--source4/torture/rpc/oxidresolve.c2
-rw-r--r--source4/torture/rpc/remact.c2
-rw-r--r--source4/torture/rpc/rot.c2
-rw-r--r--source4/torture/rpc/rpc.h1
-rw-r--r--source4/torture/rpc/samlogon.c2
-rw-r--r--source4/torture/rpc/samr.c2
-rw-r--r--source4/torture/rpc/samsync.c2
-rw-r--r--source4/torture/rpc/scanner.c2
-rw-r--r--source4/torture/rpc/schannel.c2
-rw-r--r--source4/torture/rpc/session_key.c2
-rw-r--r--source4/torture/rpc/spoolss.c2
-rw-r--r--source4/torture/rpc/srvsvc.c2
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/unixinfo.c2
-rw-r--r--source4/torture/rpc/winreg.c2
-rw-r--r--source4/torture/rpc/wkssvc.c2
-rw-r--r--source4/torture/smb2/connect.c3
-rw-r--r--source4/torture/smb2/find.c3
-rw-r--r--source4/torture/smb2/getinfo.c3
-rw-r--r--source4/torture/smb2/scan.c9
-rw-r--r--source4/torture/smb2/setinfo.c3
-rw-r--r--source4/torture/smbtorture.c2
-rw-r--r--source4/torture/torture.c14
-rw-r--r--source4/torture/torture.h4
-rw-r--r--source4/torture/ui.c2
119 files changed, 197 insertions, 165 deletions
diff --git a/source4/lib/talloc/testsuite.c b/source4/lib/talloc/testsuite.c
index a37f8c197e..b03be98587 100644
--- a/source4/lib/talloc/testsuite.c
+++ b/source4/lib/talloc/testsuite.c
@@ -48,6 +48,8 @@
#define BOOL int
#endif
+struct torture_context;
+
static struct timeval timeval_current(void)
{
struct timeval tv;
@@ -842,7 +844,7 @@ BOOL test_lifeless(void)
}
-BOOL torture_local_talloc(void)
+BOOL torture_local_talloc(struct torture_context *torture)
{
BOOL ret = True;
@@ -871,8 +873,8 @@ BOOL torture_local_talloc(void)
#if !defined(_SAMBA_BUILD_) || ((SAMBA_VERSION_MAJOR==3)&&(SAMBA_VERSION_MINOR<9))
int main(void)
{
- if (!torture_local_talloc()) {
- printf("ERROR: TESTSUIE FAILED\n");
+ if (!torture_local_talloc(NULL)) {
+ printf("ERROR: TESTSUITE FAILED\n");
return -1;
}
return 0;
diff --git a/source4/torture/auth/ntlmssp.c b/source4/torture/auth/ntlmssp.c
index c012ee5174..762db3d6ba 100644
--- a/source4/torture/auth/ntlmssp.c
+++ b/source4/torture/auth/ntlmssp.c
@@ -22,8 +22,9 @@
#include "auth/auth.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "lib/cmdline/popt_common.h"
+#include "torture/torture.h"
-BOOL torture_ntlmssp_self_check(void)
+BOOL torture_ntlmssp_self_check(struct torture_context *torture)
{
struct gensec_security *gensec_security;
struct gensec_ntlmssp_state *gensec_ntlmssp_state;
diff --git a/source4/torture/auth/pac.c b/source4/torture/auth/pac.c
index 2c5387391b..964dc822fb 100644
--- a/source4/torture/auth/pac.c
+++ b/source4/torture/auth/pac.c
@@ -29,6 +29,7 @@
#include "samba3/samba3.h"
#include "libcli/security/proto.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "torture/torture.h"
static BOOL torture_pac_self_check(void)
{
@@ -693,7 +694,7 @@ static BOOL torture_pac_saved_check(void)
return True;
}
-BOOL torture_pac(void)
+BOOL torture_pac(struct torture_context *torture)
{
BOOL ret = True;
ret &= torture_pac_self_check();
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 40a1c68b8b..00262e5e11 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -384,7 +384,7 @@ static void setpathinfo_aliases(struct smbcli_state *cli)
/* look for aliased info levels in trans2 calls */
-BOOL torture_trans2_aliases(void)
+BOOL torture_trans2_aliases(struct torture_context *torture)
{
struct smbcli_state *cli;
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index b410d5b3e5..b66adfaa5b 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -87,7 +87,7 @@ static const struct trunc_open_results attr_results[] = {
};
-BOOL torture_openattrtest(void)
+BOOL torture_openattrtest(struct torture_context *torture)
{
struct smbcli_state *cli1;
const char *fname = "\\openattr.file";
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 83ca797669..050c092296 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -116,7 +116,7 @@ static BOOL tcon_devtest(struct smbcli_state *cli,
test whether fnums and tids open on one VC are available on another (a major
security hole)
*/
-static BOOL run_fdpasstest(void)
+static BOOL run_fdpasstest(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
const char *fname = "\\fdpass.tst";
@@ -174,7 +174,7 @@ static BOOL run_fdpasstest(void)
/**
This checks how the getatr calls works
*/
-static BOOL run_attrtest(void)
+static BOOL run_attrtest(struct torture_context *torture)
{
struct smbcli_state *cli;
int fnum;
@@ -244,7 +244,7 @@ static BOOL run_attrtest(void)
/**
This checks a couple of trans2 calls
*/
-static BOOL run_trans2test(void)
+static BOOL run_trans2test(struct torture_context *torture)
{
struct smbcli_state *cli;
int fnum;
@@ -378,7 +378,7 @@ static BOOL run_trans2test(void)
}
/* send smb negprot commands, not reading the response */
-static BOOL run_negprot_nowait(void)
+static BOOL run_negprot_nowait(struct torture_context *torture)
{
int i;
struct smbcli_state *cli, *cli2;
@@ -431,7 +431,7 @@ static BOOL run_negprot_nowait(void)
this checks to see if a secondary tconx can use open files from an
earlier tconx
*/
-static BOOL run_tcon_test(void)
+static BOOL run_tcon_test(struct torture_context *torture)
{
struct smbcli_state *cli;
const char *fname = "\\tcontest.tmp";
@@ -544,7 +544,7 @@ static BOOL run_tcon_test(void)
/**
checks for correct tconX support
*/
-static BOOL run_tcon_devtype_test(void)
+static BOOL run_tcon_devtype_test(struct torture_context *torture)
{
struct smbcli_state *cli1 = NULL;
NTSTATUS status;
@@ -685,7 +685,7 @@ static BOOL rw_torture2(struct smbcli_state *c1, struct smbcli_state *c2)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
-static BOOL run_readwritetest(void)
+static BOOL run_readwritetest(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
BOOL test1, test2 = True;
@@ -794,7 +794,7 @@ static BOOL run_deferopen(struct smbcli_state *cli, int dummy)
Try with a wrong vuid and check error message.
*/
-static BOOL run_vuidtest(void)
+static BOOL run_vuidtest(struct torture_context *torture)
{
struct smbcli_state *cli;
const char *fname = "\\vuid.tst";
@@ -861,7 +861,7 @@ static BOOL run_vuidtest(void)
/*
Test open mode returns on read-only files.
*/
- static BOOL run_opentest(void)
+ static BOOL run_opentest(struct torture_context *torture)
{
static struct smbcli_state *cli1;
static struct smbcli_state *cli2;
@@ -1397,7 +1397,7 @@ error_test80:
/**
Test ntcreate calls made by xcopy
*/
-static BOOL run_xcopy(void)
+static BOOL run_xcopy(struct torture_context *torture)
{
struct smbcli_state *cli1;
const char *fname = "\\test.txt";
@@ -1441,7 +1441,7 @@ static BOOL run_xcopy(void)
/**
tries variants of chkpath
*/
-static BOOL torture_chkpath_test(void)
+static BOOL torture_chkpath_test(struct torture_context *torture)
{
struct smbcli_state *cli;
int fnum;
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index 81a9c6bb63..016d6a8a5e 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -229,7 +229,7 @@ static BOOL test_widea(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_charset(void)
+BOOL torture_charset(struct torture_context *torture)
{
static struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 2f1c4b98c7..7708e1c76d 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -625,7 +625,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
/*
testing of delayed update of write_time
*/
-BOOL torture_delay_write(void)
+BOOL torture_delay_write(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 97ae518ea8..6e1c34612f 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -1622,7 +1622,7 @@ static BOOL deltest21(struct smbcli_state **ppcli1, struct smbcli_state **ppcli2
/*
Test delete on close semantics.
*/
-BOOL torture_test_delete(void)
+BOOL torture_test_delete(struct torture_context *torture)
{
struct smbcli_state *cli1 = NULL;
struct smbcli_state *cli2 = NULL;
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 2a01d12c5b..9b9be967b1 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1410,7 +1410,7 @@ static void progress_bar(uint_t i, uint_t total)
/*
this produces a matrix of deny mode behaviour for 1 connection
*/
-BOOL torture_denytest1(void)
+BOOL torture_denytest1(struct torture_context *torture)
{
static struct smbcli_state *cli1;
int fnum1, fnum2;
@@ -1509,7 +1509,7 @@ failed:
/*
this produces a matrix of deny mode behaviour with 2 connections
*/
-BOOL torture_denytest2(void)
+BOOL torture_denytest2(struct torture_context *torture)
{
static struct smbcli_state *cli1, *cli2;
int fnum1, fnum2;
@@ -1610,7 +1610,7 @@ failed:
/*
simple test harness for playing with deny modes
*/
-BOOL torture_denytest3(void)
+BOOL torture_denytest3(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
int fnum1, fnum2;
@@ -1938,7 +1938,7 @@ BOOL torture_ntdenytest1(struct smbcli_state *cli, int client)
/*
a denytest for ntcreatex
*/
-BOOL torture_ntdenytest2(void)
+BOOL torture_ntdenytest2(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
BOOL ret;
@@ -1980,7 +1980,7 @@ BOOL torture_ntdenytest2(void)
/*
test sharing of handles with DENY_DOS on a single connection
*/
-BOOL torture_denydos_sharing(void)
+BOOL torture_denydos_sharing(struct torture_context *torture)
{
struct smbcli_state *cli;
union smb_open io;
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index ca85ac4715..7e6f200ea4 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -34,7 +34,7 @@ static void list_fn(struct clilist_file_info *finfo, const char *name, void *sta
/*
test directory listing speed
*/
-BOOL torture_dirtest1(void)
+BOOL torture_dirtest1(struct torture_context *torture)
{
int i;
struct smbcli_state *cli;
@@ -89,7 +89,7 @@ BOOL torture_dirtest1(void)
return correct;
}
-BOOL torture_dirtest2(void)
+BOOL torture_dirtest2(struct torture_context *torture)
{
int i;
struct smbcli_state *cli;
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index d21807aa83..7284f3c959 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -127,7 +127,7 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/*
basic testing of disconnects
*/
-BOOL torture_disconnect(void)
+BOOL torture_disconnect(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index 65f2dbac31..1ee7572967 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -38,7 +38,7 @@
must not use posix semantics)
2) support for lock timeouts
*/
-BOOL torture_locktest1(void)
+BOOL torture_locktest1(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
const char *fname = BASEDIR "\\lockt1.lck";
@@ -195,7 +195,7 @@ BOOL torture_locktest1(void)
3) the server denies unlock requests by an incorrect client PID
*/
-BOOL torture_locktest2(void)
+BOOL torture_locktest2(struct torture_context *torture)
{
struct smbcli_state *cli;
const char *fname = BASEDIR "\\lockt2.lck";
@@ -336,7 +336,7 @@ BOOL torture_locktest2(void)
1) the server supports the full offset range in lock requests
*/
-BOOL torture_locktest3(void)
+BOOL torture_locktest3(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
const char *fname = BASEDIR "\\lockt3.lck";
@@ -470,7 +470,7 @@ BOOL torture_locktest3(void)
/*
looks at overlapping locks
*/
-BOOL torture_locktest4(void)
+BOOL torture_locktest4(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
const char *fname = BASEDIR "\\lockt4.lck";
@@ -640,7 +640,7 @@ BOOL torture_locktest4(void)
/*
looks at lock upgrade/downgrade.
*/
-BOOL torture_locktest5(void)
+BOOL torture_locktest5(struct torture_context *torture)
{
struct smbcli_state *cli1, *cli2;
const char *fname = BASEDIR "\\lockt5.lck";
@@ -763,7 +763,7 @@ ret = NT_STATUS_IS_OK(smbcli_unlock(cli1->tree, fnum1, 0, 4)) &&
/*
tries the unusual lockingX locktype bits
*/
-BOOL torture_locktest6(void)
+BOOL torture_locktest6(struct torture_context *torture)
{
struct smbcli_state *cli;
const char *fname[1] = { "\\lock6.txt" };
@@ -805,7 +805,7 @@ BOOL torture_locktest6(void)
return True;
}
-BOOL torture_locktest7(void)
+BOOL torture_locktest7(struct torture_context *torture)
{
struct smbcli_state *cli1;
const char *fname = BASEDIR "\\lockt7.lck";
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 18b2e912ba..5eb00c076f 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -154,7 +154,7 @@ static void gen_name(char *name)
}
-BOOL torture_mangle(void)
+BOOL torture_mangle(struct torture_context *torture)
{
extern int torture_numops;
static struct smbcli_state *cli;
diff --git a/source4/torture/basic/properties.c b/source4/torture/basic/properties.c
index 1f0027cf0d..3eb05149ab 100644
--- a/source4/torture/basic/properties.c
+++ b/source4/torture/basic/properties.c
@@ -89,7 +89,7 @@ static void show_bits(const struct bitmapping *bm, uint32_t value)
/*
print out server properties
*/
-BOOL torture_test_properties(void)
+BOOL torture_test_properties(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL correct = True;
diff --git a/source4/torture/basic/rename.c b/source4/torture/basic/rename.c
index 3f4e218123..477b367745 100644
--- a/source4/torture/basic/rename.c
+++ b/source4/torture/basic/rename.c
@@ -28,7 +28,7 @@
/*
Test rename on files open with share delete and no share delete.
*/
-BOOL torture_test_rename(void)
+BOOL torture_test_rename(struct torture_context *torture)
{
struct smbcli_state *cli1;
const char *fname = "\\test.txt";
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 8017afadb1..d936173590 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -242,7 +242,7 @@ static BOOL scan_trans2(struct smbcli_state *cli, int op, int level,
}
-BOOL torture_trans2_scan(void)
+BOOL torture_trans2_scan(struct torture_context *torture)
{
static struct smbcli_state *cli;
int op, level;
@@ -483,7 +483,7 @@ static BOOL scan_nttrans(struct smbcli_state *cli, int op, int level,
}
-BOOL torture_nttrans_scan(void)
+BOOL torture_nttrans_scan(struct torture_context *torture)
{
static struct smbcli_state *cli;
int op, level;
@@ -523,7 +523,7 @@ BOOL torture_nttrans_scan(void)
/* scan for valid base SMB requests */
-BOOL torture_smb_scan(void)
+BOOL torture_smb_scan(struct torture_context *torture)
{
static struct smbcli_state *cli;
int op;
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 5b3685e1e4..3e5699ab29 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -56,7 +56,7 @@ static BOOL try_failed_login(struct smbcli_state *cli)
return True;
}
-BOOL torture_sec_leak(void)
+BOOL torture_sec_leak(struct torture_context *torture)
{
struct smbcli_state *cli;
time_t t1 = time(NULL);
diff --git a/source4/torture/basic/unlink.c b/source4/torture/basic/unlink.c
index ab7d5c5ac8..f5bfe66326 100644
--- a/source4/torture/basic/unlink.c
+++ b/source4/torture/basic/unlink.c
@@ -34,7 +34,7 @@
1) the server does not allow an unlink on a file that is open
*/
-BOOL torture_unlinktest(void)
+BOOL torture_unlinktest(struct torture_context *torture)
{
struct smbcli_state *cli;
const char *fname = BASEDIR "\\unlink.tst";
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index dfff6f168d..9e8ee6ced8 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -26,7 +26,7 @@
#include "torture/util.h"
#include "pstring.h"
-BOOL torture_utable(void)
+BOOL torture_utable(struct torture_context *torture)
{
struct smbcli_state *cli;
fstring fname;
@@ -121,7 +121,7 @@ static char *form_name(int c)
return fname;
}
-BOOL torture_casetable(void)
+BOOL torture_casetable(struct torture_context *torture)
{
static struct smbcli_state *cli;
char *fname;
diff --git a/source4/torture/ldap/basic.c b/source4/torture/ldap/basic.c
index b7a2242c95..7b041e9255 100644
--- a/source4/torture/ldap/basic.c
+++ b/source4/torture/ldap/basic.c
@@ -25,6 +25,7 @@
#include "libcli/ldap/ldap_client.h"
#include "lib/cmdline/popt_common.h"
+#include "torture/torture.h"
#include "torture/ldap/proto.h"
static BOOL test_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password)
@@ -187,7 +188,7 @@ static BOOL test_compare_sasl(struct ldap_connection *conn, const char *basedn)
}
-BOOL torture_ldap_basic(void)
+BOOL torture_ldap_basic(struct torture_context *torture)
{
NTSTATUS status;
struct ldap_connection *conn;
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 3a2b4001b9..86c261a3b0 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "libcli/cldap/cldap.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "torture/torture.h"
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
@@ -164,7 +165,7 @@ done:
return ret;
}
-BOOL torture_cldap(void)
+BOOL torture_cldap(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
BOOL ret = True;
diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c
index 8d541325e8..fc45f883e7 100644
--- a/source4/torture/ldap/cldapbench.c
+++ b/source4/torture/ldap/cldapbench.c
@@ -101,7 +101,7 @@ static BOOL bench_cldap(TALLOC_CTX *mem_ctx, const char *address)
benchmark how fast a CLDAP server can respond to a series of parallel
requests
*/
-BOOL torture_bench_cldap(void)
+BOOL torture_bench_cldap(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 18933cb033..79902d1e7c 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -69,7 +69,7 @@ static BOOL test_cleanup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_domainopen(void)
+BOOL torture_domainopen(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index eed8541f9a..5d347cd049 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -23,9 +23,10 @@
#include "lib/cmdline/popt_common.h"
#include "libnet/libnet.h"
#include "librpc/gen_ndr/nbt.h"
+#include "torture/torture.h"
-BOOL torture_lookup(void)
+BOOL torture_lookup(struct torture_context *torture)
{
BOOL ret;
NTSTATUS status;
@@ -62,7 +63,7 @@ done:
}
-BOOL torture_lookup_host(void)
+BOOL torture_lookup_host(struct torture_context *torture)
{
BOOL ret;
NTSTATUS status;
@@ -98,7 +99,7 @@ done:
}
-BOOL torture_lookup_pdc(void)
+BOOL torture_lookup_pdc(struct torture_context *torture)
{
BOOL ret;
NTSTATUS status;
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index b3efa35b46..723a2fd40b 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -25,6 +25,7 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/rpc/dcerpc.h"
+#include "torture/torture.h"
static BOOL test_lsa_connect(struct libnet_context *ctx)
@@ -70,7 +71,7 @@ static BOOL test_samr_connect(struct libnet_context *ctx)
return True;
}
-BOOL torture_rpc_connect(void)
+BOOL torture_rpc_connect(struct torture_context *torture)
{
struct libnet_context *ctx;
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index b7d877b097..65316f3f32 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -109,7 +109,7 @@ static void test_displayshares(struct libnet_ListShares s)
}
-BOOL torture_listshares(void)
+BOOL torture_listshares(struct torture_context *torture)
{
struct libnet_ListShares share;
NTSTATUS status;
@@ -194,7 +194,7 @@ static BOOL test_addshare(struct dcerpc_pipe *pipe, TALLOC_CTX *mem_ctx, const c
}
-BOOL torture_delshare(void)
+BOOL torture_delshare(struct torture_context *torture)
{
struct dcerpc_pipe *p;
struct dcerpc_binding *bind;
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c
index adb9a3bdd7..f577f352d6 100644
--- a/source4/torture/libnet/libnet_user.c
+++ b/source4/torture/libnet/libnet_user.c
@@ -23,6 +23,7 @@
#include "lib/cmdline/popt_common.h"
#include "libnet/libnet.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
+#include "torture/torture.h"
#define TEST_USERNAME "libnetusertest"
@@ -93,7 +94,7 @@ static BOOL test_cleanup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_createuser(void)
+BOOL torture_createuser(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c
index 15ff443af2..e49112ef54 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -265,7 +265,7 @@ static BOOL test_userinfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_userinfo(void)
+BOOL torture_userinfo(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index 2df495a15f..99cd435584 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -298,7 +298,7 @@ static BOOL test_usermod(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_useradd(void)
+BOOL torture_useradd(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
@@ -357,7 +357,7 @@ done:
}
-BOOL torture_userdel(void)
+BOOL torture_userdel(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
@@ -401,7 +401,7 @@ done:
}
-BOOL torture_usermod(void)
+BOOL torture_usermod(struct torture_context *torture)
{
NTSTATUS status;
const char *binding;
diff --git a/source4/torture/local/binding_string.c b/source4/torture/local/binding_string.c
index 2d180a09ef..3384a9b9d6 100644
--- a/source4/torture/local/binding_string.c
+++ b/source4/torture/local/binding_string.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "librpc/gen_ndr/epmapper.h"
#include "librpc/rpc/dcerpc.h"
+#include "torture/torture.h"
static BOOL test_BindingString(TALLOC_CTX *mem_ctx, const char *binding)
{
@@ -116,7 +117,7 @@ static const char *test_strings[] = {
"ncacn_unix_stream:[/tmp/epmapper,sign]",
};
-BOOL torture_local_binding_string(void)
+BOOL torture_local_binding_string(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_init("test_BindingString");
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 324ee489c1..7f2e328960 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -312,7 +312,7 @@ static int test_codepoint(unsigned int codepoint)
return 1;
}
-BOOL torture_local_iconv(void)
+BOOL torture_local_iconv(struct torture_context *torture)
{
size_t size;
unsigned char inbuf[1000];
@@ -382,7 +382,7 @@ BOOL torture_local_iconv(void)
#else
-BOOL torture_local_iconv(void)
+BOOL torture_local_iconv(struct torture_context *torture)
{
printf("No native iconv library - can't run iconv test\n");
return True;
diff --git a/source4/torture/local/idtree.c b/source4/torture/local/idtree.c
index d4a81cb567..7afc5e9ab9 100644
--- a/source4/torture/local/idtree.c
+++ b/source4/torture/local/idtree.c
@@ -21,8 +21,9 @@
*/
#include "includes.h"
+#include "torture/torture.h"
-BOOL torture_local_idtree(void)
+BOOL torture_local_idtree(struct torture_context *torture)
{
struct idr_context *idr;
int i;
diff --git a/source4/torture/local/irpc.c b/source4/torture/local/irpc.c
index 75659b6b84..4fa3d0ad89 100644
--- a/source4/torture/local/irpc.c
+++ b/source4/torture/local/irpc.c
@@ -24,6 +24,7 @@
#include "lib/events/events.h"
#include "lib/messaging/irpc.h"
#include "librpc/gen_ndr/ndr_echo.h"
+#include "torture/torture.h"
const uint32_t MSG_ID1 = 1, MSG_ID2 = 2;
@@ -214,7 +215,7 @@ static BOOL test_speed(TALLOC_CTX *mem_ctx,
}
-BOOL torture_local_irpc(void)
+BOOL torture_local_irpc(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_init("torture_local_irpc");
BOOL ret = True;
diff --git a/source4/torture/local/messaging.c b/source4/torture/local/messaging.c
index 0d4dfc49a8..77bce155bc 100644
--- a/source4/torture/local/messaging.c
+++ b/source4/torture/local/messaging.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "lib/events/events.h"
#include "lib/messaging/irpc.h"
+#include "torture/torture.h"
enum {MY_PING=1000, MY_PONG, MY_EXIT};
@@ -144,7 +145,7 @@ static BOOL test_ping_speed(TALLOC_CTX *mem_ctx)
return ret;
}
-BOOL torture_local_messaging(void)
+BOOL torture_local_messaging(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_init("torture_local_messaging");
BOOL ret = True;
diff --git a/source4/torture/local/ndr.c b/source4/torture/local/ndr.c
index 305f75f9c0..afd890318f 100644
--- a/source4/torture/local/ndr.c
+++ b/source4/torture/local/ndr.c
@@ -83,7 +83,7 @@ BOOL test_check_string_terminator(TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_local_ndr(void)
+BOOL torture_local_ndr(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
BOOL ret = True;
diff --git a/source4/torture/local/registry.c b/source4/torture/local/registry.c
index 95f7d3afe7..623d30a5d8 100644
--- a/source4/torture/local/registry.c
+++ b/source4/torture/local/registry.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "lib/registry/registry.h"
#include "lib/cmdline/popt_common.h"
+#include "torture/torture.h"
static BOOL test_hive(TALLOC_CTX *mem_ctx, const char *backend, const char *location)
{
@@ -80,7 +81,7 @@ static BOOL test_hive(TALLOC_CTX *mem_ctx, const char *backend, const char *loca
return True;
}
-BOOL torture_registry(void)
+BOOL torture_registry(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_init("torture_registry");
diff --git a/source4/torture/local/resolve.c b/source4/torture/local/resolve.c
index a52bfeeb48..58e313bfb4 100644
--- a/source4/torture/local/resolve.c
+++ b/source4/torture/local/resolve.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "lib/events/events.h"
#include "libcli/resolve/resolve.h"
+#include "torture/torture.h"
static BOOL test_async_resolve(TALLOC_CTX *mem_ctx)
{
@@ -73,7 +74,7 @@ static BOOL test_sync_resolve(TALLOC_CTX *mem_ctx)
}
-BOOL torture_local_resolve(void)
+BOOL torture_local_resolve(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_init("torture_local_irpc");
BOOL ret = True;
diff --git a/source4/torture/local/sddl.c b/source4/torture/local/sddl.c
index 11e6ae1fd5..b491c0b8e8 100644
--- a/source4/torture/local/sddl.c
+++ b/source4/torture/local/sddl.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "libcli/security/proto.h"
+#include "torture/torture.h"
/*
@@ -94,7 +95,7 @@ static const char *examples[] = {
};
/* test a set of example SDDL strings */
-BOOL torture_local_sddl(void)
+BOOL torture_local_sddl(struct torture_context *torture)
{
int i;
BOOL ret = True;
diff --git a/source4/torture/local/socket.c b/source4/torture/local/socket.c
index 66268f4f80..acea977331 100644
--- a/source4/torture/local/socket.c
+++ b/source4/torture/local/socket.c
@@ -256,7 +256,7 @@ done:
return ret;
}
-BOOL torture_local_socket(void)
+BOOL torture_local_socket(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_new(NULL);
diff --git a/source4/torture/local/util_file.c b/source4/torture/local/util_file.c
index 5c5047de45..ead3ab052f 100644
--- a/source4/torture/local/util_file.c
+++ b/source4/torture/local/util_file.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "system/filesys.h"
+#include "torture/torture.h"
#define TEST_FILENAME "utilfile.test"
#define TEST_LINE1 "This is list line 1..."
@@ -87,7 +88,7 @@ static BOOL test_afdgets(TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_local_util_file(void)
+BOOL torture_local_util_file(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_init("test_util_file");
diff --git a/source4/torture/local/util_strlist.c b/source4/torture/local/util_strlist.c
index bf888da797..78ebcf44fb 100644
--- a/source4/torture/local/util_strlist.c
+++ b/source4/torture/local/util_strlist.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "torture/torture.h"
static const char *test_lists_shell_strings[] = {
"",
@@ -69,7 +70,7 @@ static BOOL test_lists_shell(TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_local_util_strlist(void)
+BOOL torture_local_util_strlist(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx = talloc_init("test_util_strlist");
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 43e9e0b4c5..81c6a67b9f 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -167,7 +167,7 @@ done:
/* run a test that simulates an approximate netbench client load */
-BOOL torture_nbench(void)
+BOOL torture_nbench(struct torture_context *torture)
{
BOOL correct = True;
extern int torture_nprocs;
diff --git a/source4/torture/nbt/browse.c b/source4/torture/nbt/browse.c
index 415994ee86..1fe284f568 100644
--- a/source4/torture/nbt/browse.c
+++ b/source4/torture/nbt/browse.c
@@ -23,11 +23,12 @@
#include "includes.h"
#include "librpc/gen_ndr/nbt.h"
#include "libcli/resolve/resolve.h"
+#include "torture/torture.h"
/*
test nbt dgram operations
*/
-BOOL torture_nbt_browse(void)
+BOOL torture_nbt_browse(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c
index 79bc3995dd..d847595e3d 100644
--- a/source4/torture/nbt/dgram.c
+++ b/source4/torture/nbt/dgram.c
@@ -348,7 +348,7 @@ failed:
/*
test nbt dgram operations
*/
-BOOL torture_nbt_dgram(void)
+BOOL torture_nbt_dgram(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c
index e9c302d89c..10e8848b46 100644
--- a/source4/torture/nbt/query.c
+++ b/source4/torture/nbt/query.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "lib/events/events.h"
#include "libcli/resolve/resolve.h"
+#include "torture/torture.h"
struct result_struct {
int num_pass;
@@ -101,7 +102,7 @@ failed:
/*
benchmark how fast a server can respond to name queries
*/
-BOOL torture_bench_nbt(void)
+BOOL torture_bench_nbt(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c
index 9b928fefcf..1663adcdf2 100644
--- a/source4/torture/nbt/register.c
+++ b/source4/torture/nbt/register.c
@@ -25,6 +25,7 @@
#include "libcli/resolve/resolve.h"
#include "system/network.h"
#include "netif/netif.h"
+#include "torture/torture.h"
#define CHECK_VALUE(v, correct) do { \
if ((v) != (correct)) { \
@@ -175,7 +176,7 @@ static BOOL nbt_refresh_own(TALLOC_CTX *mem_ctx, struct nbt_name *name,
/*
test name registration to a server
*/
-BOOL torture_nbt_register(void)
+BOOL torture_nbt_register(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index f983764129..3062fb1a30 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -26,6 +26,7 @@
#include "system/network.h"
#include "netif/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "torture/torture.h"
#define CHECK_VALUE(v, correct) do { \
if ((v) != (correct)) { \
@@ -368,7 +369,7 @@ static BOOL nbt_test_wins(TALLOC_CTX *mem_ctx, const char *address)
/*
test WINS operations
*/
-BOOL torture_nbt_wins(void)
+BOOL torture_nbt_wins(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c
index e629b842e7..f0e90ec932 100644
--- a/source4/torture/nbt/winsbench.c
+++ b/source4/torture/nbt/winsbench.c
@@ -26,6 +26,7 @@
#include "libcli/resolve/resolve.h"
#include "system/network.h"
#include "netif/netif.h"
+#include "torture/torture.h"
struct wins_state {
int num_names;
@@ -273,7 +274,7 @@ static BOOL bench_wins(TALLOC_CTX *mem_ctx, struct nbt_name *name, const char *a
benchmark how fast a WINS server can respond to a mixture of
registration/refresh/release and name query requests
*/
-BOOL torture_bench_wins(void)
+BOOL torture_bench_wins(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 07c4865bdf..8b0dabca23 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -29,6 +29,7 @@
#include "system/network.h"
#include "netif/netif.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "torture/torture.h"
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
@@ -9625,7 +9626,7 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
/*
test simple WINS replication operations
*/
-BOOL torture_nbt_winsreplication_simple(void)
+BOOL torture_nbt_winsreplication_simple(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
@@ -9657,7 +9658,7 @@ BOOL torture_nbt_winsreplication_simple(void)
/*
test WINS replication replica conflicts operations
*/
-BOOL torture_nbt_winsreplication_replica(void)
+BOOL torture_nbt_winsreplication_replica(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
@@ -9691,7 +9692,7 @@ BOOL torture_nbt_winsreplication_replica(void)
/*
test WINS replication owned conflicts operations
*/
-BOOL torture_nbt_winsreplication_owned(void)
+BOOL torture_nbt_winsreplication_owned(struct torture_context *torture)
{
const char *address;
struct nbt_name name;
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index bdc2d0d764..9c4a8ba48c 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/libcli.h"
+#include "torture/torture.h"
#include "torture/util.h"
#include "libcli/rap/rap.h"
#include "libcli/raw/libcliraw.h"
@@ -427,7 +428,7 @@ static BOOL test_rap(struct smbcli_state *cli)
return res;
}
-BOOL torture_raw_rap(void)
+BOOL torture_raw_rap(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
@@ -449,7 +450,7 @@ BOOL torture_raw_rap(void)
return ret;
}
-BOOL torture_rap_scan(void)
+BOOL torture_rap_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
struct smbcli_state *cli;
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index 1c6b28f6ee..f461b0f30c 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -1427,7 +1427,7 @@ done:
/*
basic testing of security descriptor calls
*/
-BOOL torture_raw_acls(void)
+BOOL torture_raw_acls(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index c311ea9fa5..a7675f3e3e 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -214,7 +214,7 @@ done:
/*
basic testing of chkpath calls
*/
-BOOL torture_raw_chkpath(void)
+BOOL torture_raw_chkpath(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 417fedf204..41c6956c25 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -28,7 +28,7 @@
/* basic testing of all RAW_CLOSE_* calls
*/
-BOOL torture_raw_close(void)
+BOOL torture_raw_close(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 53b21c2829..2ce827df6a 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -393,7 +393,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
/*
basic testing of libcli composite calls
*/
-BOOL torture_raw_composite(void)
+BOOL torture_raw_composite(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index d53cf74573..0a400c02e6 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -747,7 +747,7 @@ static BOOL torture_raw_context_int(void)
/*
basic testing of session/tree context calls
*/
-BOOL torture_raw_context(void)
+BOOL torture_raw_context(struct torture_context *torture)
{
BOOL ret = True;
if (lp_use_spnego()) {
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index d5e0f33586..0a371688c7 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -445,7 +445,7 @@ done:
/*
basic testing of EA calls
*/
-BOOL torture_raw_eas(void)
+BOOL torture_raw_eas(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
@@ -474,7 +474,7 @@ BOOL torture_raw_eas(void)
/*
test max EA size
*/
-BOOL torture_max_eas(void)
+BOOL torture_max_eas(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index 79bb6cd95b..22e90bed8a 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -148,7 +148,7 @@ done:
/*
basic testing of some ioctl calls
*/
-BOOL torture_raw_ioctl(void)
+BOOL torture_raw_ioctl(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index d49d8613cb..e6930f2b33 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -662,7 +662,7 @@ done:
/*
basic testing of lock calls
*/
-BOOL torture_raw_lock(void)
+BOOL torture_raw_lock(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index c68fa7400e..d7b3baa2db 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -145,7 +145,7 @@ done:
/*
basic testing of all RAW_MKDIR_* calls
*/
-BOOL torture_raw_mkdir(void)
+BOOL torture_raw_mkdir(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c
index 880300c5d7..d1302a339b 100644
--- a/source4/torture/raw/mux.c
+++ b/source4/torture/raw/mux.c
@@ -307,7 +307,7 @@ done:
/*
basic testing of multiplexing notify
*/
-BOOL torture_raw_mux(void)
+BOOL torture_raw_mux(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index e781ffca87..9f0d0e355d 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -492,7 +492,7 @@ done:
/*
basic testing of change notify
*/
-BOOL torture_raw_notify(void)
+BOOL torture_raw_notify(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 9073d8452e..5dcb3cc9b6 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1393,7 +1393,7 @@ static BOOL test_raw_open_multi(void)
/* basic testing of all RAW_OPEN_* calls
*/
-BOOL torture_raw_open(void)
+BOOL torture_raw_open(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index bb1da3c67f..14d4c7bc04 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -476,7 +476,7 @@ done:
/*
basic testing of oplocks
*/
-BOOL torture_raw_oplock(void)
+BOOL torture_raw_oplock(struct torture_context *torture)
{
struct smbcli_state *cli1;
BOOL ret = True;
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index e9b8475094..6e10cc301c 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -151,7 +151,7 @@ static union smb_fileinfo *fname_find(const char *name)
for each call we test that it succeeds, and where possible test
for consistency between the calls.
*/
-BOOL torture_raw_qfileinfo(void)
+BOOL torture_raw_qfileinfo(struct torture_context *torture)
{
struct smbcli_state *cli;
int i;
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index 520dc2a5d0..0a93f65b7a 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -121,7 +121,7 @@ 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(void)
+BOOL torture_raw_qfsinfo(struct torture_context *torture)
{
struct smbcli_state *cli;
int i;
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 8fdeb61fb8..8c257462f2 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -714,7 +714,7 @@ done:
/*
basic testing of read calls
*/
-BOOL torture_raw_read(void)
+BOOL torture_raw_read(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 264b9f0b14..02a462b855 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -419,7 +419,7 @@ done:
/*
basic testing of rename calls
*/
-BOOL torture_raw_rename(void)
+BOOL torture_raw_rename(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index d027ebd273..ef415bc60b 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -1310,7 +1310,7 @@ done:
/*
basic testing of all RAW_SEARCH_* calls using a single file
*/
-BOOL torture_raw_search(void)
+BOOL torture_raw_search(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index dc0b1ea529..dddba15c0e 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -234,7 +234,7 @@ done:
/*
basic testing of seek calls
*/
-BOOL torture_raw_seek(void)
+BOOL torture_raw_seek(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 3223f266bb..33755e72b2 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -31,7 +31,7 @@
for each call we test that it succeeds, and where possible test
for consistency between the calls.
*/
-BOOL torture_raw_sfileinfo(void)
+BOOL torture_raw_sfileinfo(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
@@ -533,7 +533,7 @@ done:
/*
look for the w2k3 setpathinfo STANDARD bug
*/
-BOOL torture_raw_sfileinfo_bug(void)
+BOOL torture_raw_sfileinfo_bug(struct torture_context *torture)
{
struct smbcli_state *cli;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index 4b3d7a2a89..978a5fcc3a 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -214,7 +214,7 @@ done:
/*
basic testing of streams calls
*/
-BOOL torture_raw_streams(void)
+BOOL torture_raw_streams(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 2808124cd5..0caf55ebf7 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -401,7 +401,7 @@ done:
/*
basic testing of unlink calls
*/
-BOOL torture_raw_unlink(void)
+BOOL torture_raw_unlink(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index a00a5dd9c9..82de598f7b 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -676,7 +676,7 @@ done:
/*
basic testing of write calls
*/
-BOOL torture_raw_write(void)
+BOOL torture_raw_write(struct torture_context *torture)
{
struct smbcli_state *cli;
BOOL ret = True;
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c
index 5333dddd3e..c0428b561a 100644
--- a/source4/torture/rpc/alter_context.c
+++ b/source4/torture/rpc/alter_context.c
@@ -27,7 +27,7 @@
#include "librpc/rpc/dcerpc.h"
#include "torture/rpc/rpc.h"
-BOOL torture_rpc_alter_context(void)
+BOOL torture_rpc_alter_context(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p, *p2;
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index f77cd67c37..0381b31169 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -135,7 +135,7 @@ static BOOL test_JobAdd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_rpc_atsvc(void)
+BOOL torture_rpc_atsvc(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 9f1c14950a..0e7cbb5393 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -260,7 +260,7 @@ static void test_auto_scan(TALLOC_CTX *mem_ctx, const struct dcerpc_interface_ta
test_scan_call(mem_ctx, iface, 2);
}
-BOOL torture_rpc_autoidl(void)
+BOOL torture_rpc_autoidl(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
const struct dcerpc_interface_table *iface;
diff --git a/source4/torture/rpc/bench.c b/source4/torture/rpc/bench.c
index a4b2cf1269..92b6f513bd 100644
--- a/source4/torture/rpc/bench.c
+++ b/source4/torture/rpc/bench.c
@@ -93,7 +93,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
-BOOL torture_bench_rpc(void)
+BOOL torture_bench_rpc(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index a9ea255a02..74335a060d 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -38,7 +38,7 @@
*/
-BOOL torture_multi_bind(void)
+BOOL torture_multi_bind(struct torture_context *torture)
{
struct dcerpc_pipe *p;
struct dcerpc_binding *binding;
diff --git a/source4/torture/rpc/countcalls.c b/source4/torture/rpc/countcalls.c
index 1290b53dc6..f197e80954 100644
--- a/source4/torture/rpc/countcalls.c
+++ b/source4/torture/rpc/countcalls.c
@@ -27,7 +27,7 @@
#include "torture/rpc/rpc.h"
-BOOL torture_rpc_countcalls(void)
+BOOL torture_rpc_countcalls(struct torture_context *torture)
{
const struct dcerpc_interface_table *iface;
NTSTATUS status;
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index babbc4fcff..1813c64341 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -166,7 +166,7 @@ static BOOL test_Add(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
#endif
-BOOL torture_rpc_dfs(void)
+BOOL torture_rpc_dfs(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index a515df1847..ffef717489 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -623,7 +623,7 @@ BOOL test_DsUnbind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-BOOL torture_rpc_drsuapi(void)
+BOOL torture_rpc_drsuapi(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index d49c824606..fb63212f27 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -773,7 +773,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-BOOL torture_rpc_drsuapi_cracknames(void)
+BOOL torture_rpc_drsuapi_cracknames(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/dssetup.c b/source4/torture/rpc/dssetup.c
index 828c017c00..d1ba3b414f 100644
--- a/source4/torture/rpc/dssetup.c
+++ b/source4/torture/rpc/dssetup.c
@@ -57,7 +57,7 @@ BOOL test_DsRoleGetPrimaryDomainInformation(struct dcerpc_pipe *p, TALLOC_CTX *m
return ret;
}
-BOOL torture_rpc_dssetup(void)
+BOOL torture_rpc_dssetup(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 695cbb4d53..e74f4d8b5b 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -26,6 +26,7 @@
#include "librpc/gen_ndr/ndr_drsuapi_c.h"
#include "libcli/cldap/cldap.h"
#include "libcli/ldap/ldap_client.h"
+#include "torture/torture.h"
#include "torture/ldap/proto.h"
struct DsSyncBindInfo {
@@ -547,7 +548,7 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
return ret;
}
-BOOL torture_rpc_dssync(void)
+BOOL torture_rpc_dssync(struct torture_context *torture)
{
BOOL ret = True;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 0db41c4bcb..5752b90ccf 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -482,7 +482,7 @@ failed:
}
-BOOL torture_rpc_echo(void)
+BOOL torture_rpc_echo(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index ee11cae084..9e477625db 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -272,7 +272,7 @@ static BOOL test_InqObject(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_rpc_epmapper(void)
+BOOL torture_rpc_epmapper(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 1372dd6b73..381b34a49c 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -222,7 +222,7 @@ static BOOL test_OpenEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return True;
}
-BOOL torture_rpc_eventlog(void)
+BOOL torture_rpc_eventlog(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/initshutdown.c b/source4/torture/rpc/initshutdown.c
index 2652ad6cfb..17589040cc 100644
--- a/source4/torture/rpc/initshutdown.c
+++ b/source4/torture/rpc/initshutdown.c
@@ -113,7 +113,7 @@ static BOOL test_Abort(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return True;
}
-BOOL torture_rpc_initshutdown(void)
+BOOL torture_rpc_initshutdown(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index 2a3c26087f..0cb0f09ad5 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -7,7 +7,7 @@
#define TORTURE_NETBIOS_NAME "smbtorturejoin"
-BOOL torture_rpc_join(void)
+BOOL torture_rpc_join(struct torture_context *torture)
{
struct test_join *tj;
struct cli_credentials *machine_account;
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 61ab4bdc49..ffc1863f22 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1812,7 +1812,7 @@ BOOL test_lsa_Close(struct dcerpc_pipe *p,
return True;
}
-BOOL torture_rpc_lsa(void)
+BOOL torture_rpc_lsa(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/lsa_lookup.c b/source4/torture/rpc/lsa_lookup.c
index 0dc3c38916..fa2bc724e5 100644
--- a/source4/torture/rpc/lsa_lookup.c
+++ b/source4/torture/rpc/lsa_lookup.c
@@ -219,7 +219,7 @@ static BOOL get_downleveltrust(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p,
#define NUM_SIDS 8
-BOOL torture_rpc_lsa_lookup(void)
+BOOL torture_rpc_lsa_lookup(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 653c49d038..db503b3775 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -174,7 +174,7 @@ static BOOL test_stop_server_listening(struct dcerpc_pipe *p,
}
-BOOL torture_rpc_mgmt(void)
+BOOL torture_rpc_mgmt(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 14e7a49305..b66ea719cc 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1501,7 +1501,7 @@ static BOOL test_ManyGetDCName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
-BOOL torture_rpc_netlogon(void)
+BOOL torture_rpc_netlogon(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 4004476a22..c56d4b6e86 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -215,7 +215,7 @@ static int test_ServerAlive2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return 1;
}
-BOOL torture_rpc_oxidresolve(void)
+BOOL torture_rpc_oxidresolve(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p, *premact;
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index ed7c1935a2..067073f501 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -96,7 +96,7 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return 1;
}
-BOOL torture_rpc_remact(void)
+BOOL torture_rpc_remact(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/rot.c b/source4/torture/rpc/rot.c
index 48a8717fa5..f57736e1c7 100644
--- a/source4/torture/rpc/rot.c
+++ b/source4/torture/rpc/rot.c
@@ -24,7 +24,7 @@
#include "librpc/gen_ndr/ndr_rot.h"
#include "torture/rpc/rpc.h"
-BOOL torture_rpc_rot(void)
+BOOL torture_rpc_rot(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/rpc.h b/source4/torture/rpc/rpc.h
index 78d0860f23..349ee93ab9 100644
--- a/source4/torture/rpc/rpc.h
+++ b/source4/torture/rpc/rpc.h
@@ -22,6 +22,7 @@
#ifndef __TORTURE_RPC_H__
#define __TORTURE_RPC_H__
+#include "torture/torture.h"
#include "auth/credentials/credentials.h"
#include "torture/rpc/drsuapi.h"
#include "libnet/libnet_join.h"
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index cca1cdeb98..198cbae232 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1469,7 +1469,7 @@ BOOL test_InteractiveLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
-BOOL torture_rpc_samlogon(void)
+BOOL torture_rpc_samlogon(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 588450e30c..3501ab300d 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3367,7 +3367,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
-BOOL torture_rpc_samr(void)
+BOOL torture_rpc_samr(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 0d8fb0b5d5..b61282d37e 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -1401,7 +1401,7 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
-BOOL torture_rpc_samsync(void)
+BOOL torture_rpc_samsync(struct torture_context *torture)
{
NTSTATUS status;
TALLOC_CTX *mem_ctx;
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index 85fc95aa63..765151f1b8 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -137,7 +137,7 @@ static BOOL test_inq_if_ids(struct dcerpc_pipe *p,
}
-BOOL torture_rpc_scanner(void)
+BOOL torture_rpc_scanner(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index cb3723f995..b814543730 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -449,7 +449,7 @@ failed:
/*
a schannel test suite
*/
-BOOL torture_rpc_schannel(void)
+BOOL torture_rpc_schannel(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx;
BOOL ret = True;
diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c
index 60a924da1d..1d02741994 100644
--- a/source4/torture/rpc/session_key.c
+++ b/source4/torture/rpc/session_key.c
@@ -161,7 +161,7 @@ static BOOL test_CreateSecret_basic(struct dcerpc_pipe *p,
/* TEST session key correctness by pushing and pulling secrets */
-BOOL torture_rpc_lsa_secrets(void)
+BOOL torture_rpc_lsa_secrets(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index eb73bfa36b..4011c2bc6c 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2050,7 +2050,7 @@ static BOOL test_EnumPrinterDrivers_old(struct dcerpc_pipe *p, TALLOC_CTX *mem_c
return ret;
}
-BOOL torture_rpc_spoolss(void)
+BOOL torture_rpc_spoolss(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index c9aa22c4bc..41b27df205 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -713,7 +713,7 @@ static BOOL test_NetRemoteTOD(struct dcerpc_pipe *p,
return ret;
}
-BOOL torture_rpc_srvsvc(void)
+BOOL torture_rpc_srvsvc(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index dbdce859f8..6c15249950 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -108,7 +108,7 @@ static BOOL test_CloseServiceHandle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return True;
}
-BOOL torture_rpc_svcctl(void)
+BOOL torture_rpc_svcctl(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/unixinfo.c b/source4/torture/rpc/unixinfo.c
index b351c397e8..3eafb17c44 100644
--- a/source4/torture/rpc/unixinfo.c
+++ b/source4/torture/rpc/unixinfo.c
@@ -64,7 +64,7 @@ static BOOL test_getpwuid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return NT_STATUS_IS_OK(result);
}
-BOOL torture_rpc_unixinfo(void)
+BOOL torture_rpc_unixinfo(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 8d1ead59e4..e477c25e3e 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -786,7 +786,7 @@ static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-BOOL torture_rpc_winreg(void)
+BOOL torture_rpc_winreg(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 5e5975cf62..9d336e8177 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -88,7 +88,7 @@ static BOOL test_NetWkstaTransportEnum(struct dcerpc_pipe *p,
-BOOL torture_rpc_wkssvc(void)
+BOOL torture_rpc_wkssvc(struct torture_context *torture)
{
NTSTATUS status;
struct dcerpc_pipe *p;
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index 10b7046375..349fcda992 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -25,6 +25,7 @@
#include "librpc/gen_ndr/security.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "torture/torture.h"
#include "torture/smb2/proto.h"
/*
@@ -187,7 +188,7 @@ static struct smb2_handle torture_smb2_create(struct smb2_tree *tree,
/*
basic testing of SMB2 connection calls
*/
-BOOL torture_smb2_connect(void)
+BOOL torture_smb2_connect(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
diff --git a/source4/torture/smb2/find.c b/source4/torture/smb2/find.c
index 19e41fdc7e..49b4030c07 100644
--- a/source4/torture/smb2/find.c
+++ b/source4/torture/smb2/find.c
@@ -24,6 +24,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "torture/torture.h"
#include "torture/smb2/proto.h"
static struct {
@@ -204,7 +205,7 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
/* basic testing of all SMB2 find levels
*/
-BOOL torture_smb2_find(void)
+BOOL torture_smb2_find(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
diff --git a/source4/torture/smb2/getinfo.c b/source4/torture/smb2/getinfo.c
index f52025c702..dac6225381 100644
--- a/source4/torture/smb2/getinfo.c
+++ b/source4/torture/smb2/getinfo.c
@@ -24,6 +24,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "torture/torture.h"
#include "torture/smb2/proto.h"
static struct {
@@ -160,7 +161,7 @@ static BOOL torture_smb2_fsinfo(struct smb2_tree *tree)
/* basic testing of all SMB2 getinfo levels
*/
-BOOL torture_smb2_getinfo(void)
+BOOL torture_smb2_getinfo(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
diff --git a/source4/torture/smb2/scan.c b/source4/torture/smb2/scan.c
index 44dced9427..28e83541c7 100644
--- a/source4/torture/smb2/scan.c
+++ b/source4/torture/smb2/scan.c
@@ -25,6 +25,7 @@
#include "libcli/smb2/smb2_calls.h"
#include "lib/cmdline/popt_common.h"
#include "lib/events/events.h"
+#include "torture/torture.h"
#include "torture/smb2/proto.h"
@@ -35,7 +36,7 @@
/*
scan for valid SMB2 getinfo levels
*/
-BOOL torture_smb2_getinfo_scan(void)
+BOOL torture_smb2_getinfo_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
@@ -103,7 +104,7 @@ BOOL torture_smb2_getinfo_scan(void)
/*
scan for valid SMB2 setinfo levels
*/
-BOOL torture_smb2_setinfo_scan(void)
+BOOL torture_smb2_setinfo_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
@@ -150,7 +151,7 @@ BOOL torture_smb2_setinfo_scan(void)
/*
scan for valid SMB2 scan levels
*/
-BOOL torture_smb2_find_scan(void)
+BOOL torture_smb2_find_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
@@ -197,7 +198,7 @@ BOOL torture_smb2_find_scan(void)
/*
scan for valid SMB2 opcodes
*/
-BOOL torture_smb2_scan(void)
+BOOL torture_smb2_scan(struct torture_context *torture)
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c
index e046d70acf..18cf841f15 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -25,6 +25,7 @@
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "torture/torture.h"
#include "torture/smb2/proto.h"
#define BASEDIR ""
@@ -33,7 +34,7 @@
for each call we test that it succeeds, and where possible test
for consistency between the calls.
*/
-BOOL torture_smb2_setinfo(void)
+BOOL torture_smb2_setinfo(struct torture_context *torture)
{
struct smb2_tree *tree;
BOOL ret = True;
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index c2f4f84fac..1520ff741c 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -76,7 +76,7 @@ static BOOL run_test(const char *name)
} else {
struct timeval tv = timeval_current();
- if (!o->fn()) {
+ if (!o->fn(NULL)) {
ret = False;
printf("TEST %s FAILED!\n", o->name);
}
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 47b031f677..6c1f8ea019 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -33,6 +33,7 @@
#include "auth/credentials/credentials.h"
#include "libcli/ldap/ldap_client.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "torture/torture.h"
#include "torture/raw/proto.h"
#include "libcli/smb2/smb2.h"
@@ -45,7 +46,6 @@
#include "torture/com/proto.h"
#include "torture/nbt/proto.h"
#include "torture/libnet/proto.h"
-#include "torture/torture.h"
#include "torture/util.h"
#include "build.h"
#include "dlinklist.h"
@@ -165,7 +165,7 @@ static BOOL rw_torture(struct smbcli_state *c)
static BOOL run_torture(struct smbcli_state *cli, int dummy)
{
- BOOL ret;
+ BOOL ret;
ret = rw_torture(cli);
@@ -180,7 +180,7 @@ static BOOL run_torture(struct smbcli_state *cli, int dummy)
/*
see how many RPC pipes we can open at once
*/
-static BOOL run_pipe_number(void)
+static BOOL run_pipe_number(struct torture_context *torture)
{
struct smbcli_state *cli1;
const char *pipe_name = "\\WKSSVC";
@@ -218,7 +218,7 @@ static BOOL run_pipe_number(void)
used for testing performance when there are N idle users
already connected
*/
- static BOOL torture_holdcon(void)
+ static BOOL torture_holdcon(struct torture_context *torture)
{
int i;
struct smbcli_state **cli;
@@ -367,7 +367,7 @@ static BOOL run_maxfidtest(struct smbcli_state *cli, int dummy)
/*
sees what IOCTLs are supported
*/
-static BOOL torture_ioctl_test(void)
+static BOOL torture_ioctl_test(struct torture_context *torture)
{
struct smbcli_state *cli;
uint16_t device, function;
@@ -577,7 +577,7 @@ double torture_create_procs(BOOL (*fn)(struct smbcli_state *, int), BOOL *result
static struct {
const char *name;
- BOOL (*fn)(void);
+ BOOL (*fn)(struct torture_context *);
BOOL (*multi_fn)(struct smbcli_state *, int );
} builtin_torture_ops[] = {
/* benchmarking tests */
@@ -676,7 +676,7 @@ static void register_builtin_ops(void)
struct torture_op *torture_ops = NULL;
-_PUBLIC_ NTSTATUS register_torture_op(const char *name, BOOL (*fn)(void), BOOL (*multi_fn)(struct smbcli_state *, int ))
+_PUBLIC_ NTSTATUS register_torture_op(const char *name, BOOL (*fn)(struct torture_context *), BOOL (*multi_fn)(struct smbcli_state *, int ))
{
struct torture_op *op, *p;
diff --git a/source4/torture/torture.h b/source4/torture/torture.h
index 9d0f84759b..271a9bf4a3 100644
--- a/source4/torture/torture.h
+++ b/source4/torture/torture.h
@@ -23,9 +23,10 @@
#define __TORTURE_H__
struct smbcli_state;
+struct torture_context;
struct torture_op {
const char *name;
- BOOL (*fn)(void);
+ BOOL (*fn)(struct torture_context *);
BOOL (*multi_fn)(struct smbcli_state *, int );
struct torture_op *prev, *next;
};
@@ -41,7 +42,6 @@ extern int torture_numops;
extern int torture_failures;
extern BOOL use_level_II_oplocks;
-struct torture_context;
struct torture_test;
#include "torture/proto.h"
diff --git a/source4/torture/ui.c b/source4/torture/ui.c
index ef4b45b77d..0ab8d4e8da 100644
--- a/source4/torture/ui.c
+++ b/source4/torture/ui.c
@@ -48,7 +48,7 @@ struct torture_test *torture_subtest(struct torture_test *parent, const char *na
return NULL;
}
-void torture_comment(struct torture_test *test, const char *comment, ...)
+void torture_comment(struct torture_test *test, const char *comment, ...) _PRINTF_ATTRIBUTE(2,3)
{
va_list ap;
char *tmp;