Add torture_context argument to all torture tests
authorjelmer <jelmer@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sat, 25 Mar 2006 16:01:28 +0000 (16:01 +0000)
committerjelmer <jelmer@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Sat, 25 Mar 2006 16:01:28 +0000 (16:01 +0000)
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@14720 0c0555d6-39d7-0310-84fc-f1cc0bd64818

119 files changed:
source/lib/talloc/testsuite.c
source/torture/auth/ntlmssp.c
source/torture/auth/pac.c
source/torture/basic/aliases.c
source/torture/basic/attr.c
source/torture/basic/base.c
source/torture/basic/charset.c
source/torture/basic/delaywrite.c
source/torture/basic/delete.c
source/torture/basic/denytest.c
source/torture/basic/dir.c
source/torture/basic/disconnect.c
source/torture/basic/locking.c
source/torture/basic/mangle_test.c
source/torture/basic/properties.c
source/torture/basic/rename.c
source/torture/basic/scanner.c
source/torture/basic/secleak.c
source/torture/basic/unlink.c
source/torture/basic/utable.c
source/torture/ldap/basic.c
source/torture/ldap/cldap.c
source/torture/ldap/cldapbench.c
source/torture/libnet/domain.c
source/torture/libnet/libnet_lookup.c
source/torture/libnet/libnet_rpc.c
source/torture/libnet/libnet_share.c
source/torture/libnet/libnet_user.c
source/torture/libnet/userinfo.c
source/torture/libnet/userman.c
source/torture/local/binding_string.c
source/torture/local/iconv.c
source/torture/local/idtree.c
source/torture/local/irpc.c
source/torture/local/messaging.c
source/torture/local/ndr.c
source/torture/local/registry.c
source/torture/local/resolve.c
source/torture/local/sddl.c
source/torture/local/socket.c
source/torture/local/util_file.c
source/torture/local/util_strlist.c
source/torture/nbench/nbench.c
source/torture/nbt/browse.c
source/torture/nbt/dgram.c
source/torture/nbt/query.c
source/torture/nbt/register.c
source/torture/nbt/wins.c
source/torture/nbt/winsbench.c
source/torture/nbt/winsreplication.c
source/torture/rap/rap.c
source/torture/raw/acls.c
source/torture/raw/chkpath.c
source/torture/raw/close.c
source/torture/raw/composite.c
source/torture/raw/context.c
source/torture/raw/eas.c
source/torture/raw/ioctl.c
source/torture/raw/lock.c
source/torture/raw/mkdir.c
source/torture/raw/mux.c
source/torture/raw/notify.c
source/torture/raw/open.c
source/torture/raw/oplock.c
source/torture/raw/qfileinfo.c
source/torture/raw/qfsinfo.c
source/torture/raw/read.c
source/torture/raw/rename.c
source/torture/raw/search.c
source/torture/raw/seek.c
source/torture/raw/setfileinfo.c
source/torture/raw/streams.c
source/torture/raw/unlink.c
source/torture/raw/write.c
source/torture/rpc/alter_context.c
source/torture/rpc/atsvc.c
source/torture/rpc/autoidl.c
source/torture/rpc/bench.c
source/torture/rpc/bind.c
source/torture/rpc/countcalls.c
source/torture/rpc/dfs.c
source/torture/rpc/drsuapi.c
source/torture/rpc/drsuapi_cracknames.c
source/torture/rpc/dssetup.c
source/torture/rpc/dssync.c
source/torture/rpc/echo.c
source/torture/rpc/epmapper.c
source/torture/rpc/eventlog.c
source/torture/rpc/initshutdown.c
source/torture/rpc/join.c
source/torture/rpc/lsa.c
source/torture/rpc/lsa_lookup.c
source/torture/rpc/mgmt.c
source/torture/rpc/netlogon.c
source/torture/rpc/oxidresolve.c
source/torture/rpc/remact.c
source/torture/rpc/rot.c
source/torture/rpc/rpc.h
source/torture/rpc/samlogon.c
source/torture/rpc/samr.c
source/torture/rpc/samsync.c
source/torture/rpc/scanner.c
source/torture/rpc/schannel.c
source/torture/rpc/session_key.c
source/torture/rpc/spoolss.c
source/torture/rpc/srvsvc.c
source/torture/rpc/svcctl.c
source/torture/rpc/unixinfo.c
source/torture/rpc/winreg.c
source/torture/rpc/wkssvc.c
source/torture/smb2/connect.c
source/torture/smb2/find.c
source/torture/smb2/getinfo.c
source/torture/smb2/scan.c
source/torture/smb2/setinfo.c
source/torture/smbtorture.c
source/torture/torture.c
source/torture/torture.h
source/torture/ui.c

index a37f8c197e3a4f95b5144c73eb35a69c4c56b968..b03be98587aaf06a92f93bfcdac879e2f0fe94b2 100644 (file)
@@ -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;
index c012ee5174e7f28f29a5da088226e0dd62a45807..762db3d6ba41b38210f4eb721a9c026de7265a33 100644 (file)
@@ -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;
index 2c5387391b0381d5edb316d896aaf7b338caa81f..964dc822fbf6fb004c640e6ec8e277630b847fe1 100644 (file)
@@ -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();
index 40a1c68b8bd10c73ca7f7fd9f8a20b23fdaeccbf..00262e5e11b38913f6aa63da72ac555fe0cb6293 100644 (file)
@@ -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;
 
index b410d5b3e5f844a6b1a579d8e5c206fafb0ceba6..b66adfaa5bcfdea857242a3c7ac4fd5db279d17e 100644 (file)
@@ -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";
index 83ca7976696d2b61ac898b6489a8c6b813c7542c..050c09229606e8c40f5be2992c7aed6543345d22 100644 (file)
@@ -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;
index 81a9c6bb63fe6fae75cc8ca354dc89fba6708918..016d6a8a5ede142a8cbebec7395103a251270ecb 100644 (file)
@@ -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;
index 2f1c4b98c72c757304ca03b20a5a981800b8d15d..7708e1c76d8b7b08030a22c742c96217e45de2e3 100644 (file)
@@ -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;
index 97ae518ea831966c4392a4639fed0977a59c77f0..6e1c34612f201b3f052da0bde75efd00da60bcad 100644 (file)
@@ -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;
index 2a01d12c5ba04dd673a1955738ba6f379cd46862..9b9be967b1a27c852a0a562380ee387f4a5d1087 100644 (file)
@@ -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;
index ca85ac4715abc67fdb7caccff3f5437fc062845f..7e6f200ea47333cb5aee7871f43673edc1de8d79 100644 (file)
@@ -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;
index d21807aa83973de5583518f9c3e580bcd7a4ee77..7284f3c959553e3da94e339bcf5cab1f0a7b45ba 100644 (file)
@@ -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;
index 65f2dbac31749e201d85eb385310e509db0585e1..1ee7572967b8937943a456fa3f7a32c5c1e50c2a 100644 (file)
@@ -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";
index 18b2e912bad14667d2b74fdada72d7ccf111b8d1..5eb00c076ffbdade7508bd4706a7eae4d4b29f80 100644 (file)
@@ -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;
index 1f0027cf0d56eefee9653b0485c38aed5f20b391..3eb05149ab9fc8d76256a1b7daddfa7d259893d5 100644 (file)
@@ -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;
index 3f4e21812341f0505a25747fc439ef1f96184f14..477b367745e296ea44ed35b0aad6908a14ad1bb7 100644 (file)
@@ -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";
index 8017afadb1011986a6fa7503e1fed1e196851785..d9361735904d02f87283a6c91d9f30231115cddd 100644 (file)
@@ -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;
index 5b3685e1e42c76e3a69f0ec73de65687377ad510..3e5699ab29b4a3af1f9137624a257da8311ca253 100644 (file)
@@ -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);
index ab7d5c5ac8f07b4730adb0aad0b067dcfc92787b..f5bfe66326e697730cb3eb49f2a4af8f48672e27 100644 (file)
@@ -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";
index dfff6f168dc3cd98a8b106f3d1c16380d6c94bf8..9e8ee6ced85369d9d271864ec8f2706cbaf55dc6 100644 (file)
@@ -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;
index b7a2242c954806f8277fc54d47fd2595b69bdc44..7b041e9255a6eb601b60e9eb90e8d9e05f66301e 100644 (file)
@@ -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;
index 3a2b4001b925d6be4eed11f90724cb56d9db4e42..86c261a3b003f02912855a9ac753afe9f42dbe9e 100644 (file)
@@ -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;
index 8d541325e8f748f2f1727b5718382f3e2774fd68..fc45f883e7d0c05eafc40d4d66d0db5f2b750877 100644 (file)
@@ -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;
index 18933cb033f9c6123c601052f94ba91cf61c29e0..79902d1e7cc6af9e14c4d0645b8809bd18f07c05 100644 (file)
@@ -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;
index eed8541f9a69ee1da0ee74af4da6b6d72600a73d..5d347cd049a5e42c3f089567921e135f0a476016 100644 (file)
 #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;
index b3efa35b463ffb865947b4cffc97c49b8e1576ba..723a2fd40b10e87dcb3101063f49b0b40c607d85 100644 (file)
@@ -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;
        
index b7d877b0975ca507c866f70eddaa57904a9490d7..65316f3f3246b1f9adb0878d9f90ad58c92fa732 100644 (file)
@@ -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;
index adb9a3bdd71602cc782e508eafe0385bd858cadb..f577f352d6862f74a260ce7c6a3bfc2ce2e19ab1 100644 (file)
@@ -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;
index 15ff443af24e49bb91d7119ba5c113ebb7dd7781..e49112ef5403949105344ed5f6b6f31b819e4c96 100644 (file)
@@ -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;
index 2df495a15fc85442f633a35d3a73811913ed87a0..99cd435584ab360e3ace927ab056e53b686c5c8b 100644 (file)
@@ -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;
index 2d180a09ef7f136cb69b696443be1fdd6c67d90d..3384a9b9d6f52790c1cc98443a58132eaaba1853 100644 (file)
@@ -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");
index 324ee489c1f7d75a49f0aef5de8c58743c3def24..7f2e32896007772e4a5777d88b598eb5a2763311 100644 (file)
@@ -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;
index d4a81cb56748755b133eaa2a9357f9ae17d6dfef..7afc5e9ab97b576469db2cc5ea1d69202643ddfe 100644 (file)
@@ -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;
index 75659b6b84cd96c8ffd424255e91d976a680787a..4fa3d0ad8995930a91575849a815bf21986aaf54 100644 (file)
@@ -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;
index 0d4dfc49a8a98aefffbc49edf7c32973b14b2755..77bce155bc544903f627ec4c1babbf62d29ff7b8 100644 (file)
@@ -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;
index 305f75f9c002365a933240914285050aa4994502..afd890318fc8ee0c801a3ead810dcf34f073689d 100644 (file)
@@ -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;
index 95f7d3afe7240d5b332c6efc7b4ed6d1c61d6d83..623d30a5d85463f1de54ba52b9c634717d3b1814 100644 (file)
@@ -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");
index a52bfeeb48fb504f0afdfaf1fed21e1ab23584bb..58e313bfb44d74c66944a0c866390e06531e5f51 100644 (file)
@@ -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;
index 11e6ae1fd524e9c53a4d8d68d0d741ec3aba697b..b491c0b8e8ade1a1e8a257cb00bd84bc16ead6be 100644 (file)
@@ -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;
index 66268f4f8018cb40a815688aca77f087a1e3f0de..acea977331faf75426d0579b8a8c45207d30f38f 100644 (file)
@@ -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);
index 5c5047de45d525f46633c53abfe2a87e65d754b5..ead3ab052f9b34eaf23d27e7aced2e115133827e 100644 (file)
@@ -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");
index bf888da7970c2b62d67fb5cf6451f99fb0924e18..78ebcf44fb093c29ecd415069bf2b0e44c4f7895 100644 (file)
@@ -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");
index 43e9e0b4c581be4fc00b0065369b02c0736f06ee..81c6a67b9f11645811aff44d67587ec49c68e33f 100644 (file)
@@ -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;
index 415994ee868345fda59c08cdd392a00b67f9393c..1fe284f568ffd6e28bf203374f07e8e4d389f2e8 100644 (file)
 #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;
index 79bc3995ddbe0d36cad954a944fbd640c9144377..d847595e3d89dfe7709d70e667eeaac4b2a7ae9e 100644 (file)
@@ -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;
index e9c302d89ce67b867d81b25764189d9716b64cd2..10e8848b4615971b4a383265ee9dcbd2bfb89bcf 100644 (file)
@@ -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;
index 9b928fefcf6f4dc35caa1db6e44058f001f48a08..1663adcdf22ffc3351b35b953a7a8e8854708954 100644 (file)
@@ -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;
index f983764129a9f036d93259f72d4481e0ec0fb1df..3062fb1a3016f7fb251ece9dd32b6f0c335d3eef 100644 (file)
@@ -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;
index e629b842e78cf434b6d651845ddce2d685e54e9e..f0e90ec9321b8d790272dc3dcfc4eac3e8601565 100644 (file)
@@ -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;
index 07c4865bdfe51652b8203291c14977de0b2b704d..8b0dabca23489e3a9310cb79331371fdb52b6d02 100644 (file)
@@ -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;
index bdc2d0d764016d56588b2303e6183c84272b09c3..9c4a8ba48c728cf46785d519ab22fecf45ddc2b5 100644 (file)
@@ -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;
index 1c6b28f6ee6ee3c13c29789fd8f8d4333a5a7fae..f461b0f30cb98c17d35abf3d8d7c4939897c5f01 100644 (file)
@@ -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;
index c311ea9fa5e602b4af10988204519dc3d5c412f3..a7675f3e3e9b86971133ffa72831c86055793e9c 100644 (file)
@@ -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;
index 417fedf2046a02bd81963594f20460007692f34f..41c6956c253ecc46f672901b47aaca4049ee7745 100644 (file)
@@ -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;
index 53b21c2829b030569203a66f8b81a3be64502fee..2ce827df6a37012a692a5bd407b71e54a0468a2f 100644 (file)
@@ -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;
index d53cf74573f75992798b96973ee9d2a0975d1ea5..0a400c02e6dfcd1aaece14afa8d9dceb7d79fdbe 100644 (file)
@@ -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()) {
index d5e0f33586b83da265f396ead3ca53d17619eac1..0a371688c75b7274e4678ed9624fa68995b5ef26 100644 (file)
@@ -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;
index 79bb6cd95b8f9456fa1ae4e670ebace8e67cd214..22e90bed8a687dcacc32916eeb9793015ca8c211 100644 (file)
@@ -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;
index d49d8613cb98e3c5e8d04886de3bb375125b9bec..e6930f2b33b94a87e31b53c343adc7f796fa680b 100644 (file)
@@ -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;
index c68fa7400e568c2978996557868b42bbbea10054..d7b3baa2dba56f174cfb1d858590e37846e759ff 100644 (file)
@@ -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;
index 880300c5d74c7f0541b07b824eda909d86b15f98..d1302a339b849e9078f8c8befabe815128d7f65a 100644 (file)
@@ -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;
index e781ffca87255bcd643f001c37dd8d819327fcea..9f0d0e355df87c6787f7108556e5d1b86ed019d3 100644 (file)
@@ -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;
index 9073d8452e2f584090552679e30f93e6a08a9371..5dcb3cc9b6dd95d11d7b068563c648e0b5044aa4 100644 (file)
@@ -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;
index bb1da3c67fb781471cdb0943d3d8c354873fc49a..14d4c7bc0439d5e54fd996739481536375cf010b 100644 (file)
@@ -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;
index e9b847509459eb53252892063a210dce31a55e0c..6e10cc301c591de3a7545f6b538b978892f8990e 100644 (file)
@@ -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;
index 520dc2a5d04f776d343811131c1cda344f091d65..0a93f65b7aba4ec33d04bd7e94d3f04b31ca320e 100644 (file)
@@ -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;
index 8fdeb61fb8729c5fed394f16a786980868db2f0c..8c257462f2f0b890ee0ff30ee900253e434da77f 100644 (file)
@@ -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;
index 264b9f0b14fe68592bd700185cedd1d1de4af8f4..02a462b855e7e2756f18e5107abab642eb5c0cbf 100644 (file)
@@ -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;
index d027ebd273f4afa1c021ae3370a42ff9c39e4138..ef415bc60b0a8aca4300a4929948e620377fe7df 100644 (file)
@@ -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;
index dc0b1ea529d57af35752291340fede22d37864db..dddba15c0e5532ceacf590cac0a4b302b0545ecc 100644 (file)
@@ -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;
index 3223f266bb96094f18704f585eae0871c9b5ec6a..33755e72b21c1419abb6f5b5285a141f33ff15d2 100644 (file)
@@ -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;
index 4b3d7a2a89262d9e8fcf501398b491e522d1fc6a..978a5fcc3a9ccdde6dcf7c5fcbfbf0a919bdd17f 100644 (file)
@@ -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;
index 2808124cd52e5fbf142c5e7e7df15d8e2dbc3cf3..0caf55ebf79ae17f3831707b0cec2046886f893c 100644 (file)
@@ -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;
index a00a5dd9c91eb691e7aa276310ac943b1cfc2e8d..82de598f7b3ef07a0395420f6a6f60ae18fa0262 100644 (file)
@@ -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;
index 5333dddd3e84d8f7925d603a5335d8689f50b13e..c0428b561ade34af28fd0027a8b289831d4bbc3d 100644 (file)
@@ -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;
index f77cd67c374ab6ecad591daf5f7682080186ce42..0381b31169efcdaceffbad56b7d2fdf64e3c87d7 100644 (file)
@@ -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;
index 9f1c14950a3eeb5d712404950f321491f9a12016..0e7cbb53935ac837d2841378ecb635fd5d9ea8e4 100644 (file)
@@ -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;
index a4b2cf1269ed9390964a780db03868ee22521300..92b6f513bded773689249e5df4dae8e19d4fb9e0 100644 (file)
@@ -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;
index a9ea255a0291b17e424bde57e3e5b7b7a02bcdb8..74335a060d9c0afa4cb0aa03425b7bb24d0ddb47 100644 (file)
@@ -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;
index 1290b53dc64ac01775a9dc336158087a580603cd..f197e80954b8f7bf7f1ecc045c5515e71f5ac806 100644 (file)
@@ -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;
index babbc4fcff78aeca7988dbd49bdf9cd4e410bc9c..1813c6434161e3bba19a605b1e01de771cccd69f 100644 (file)
@@ -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;
index a515df184787063aed3081c445e53b6b73dcca5f..ffef717489c18a28047dff808dfc7242a98df5aa 100644 (file)
@@ -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;
index d49c8246061c8525cc49e6afe944183300cd8a10..fb63212f275f9c878eb4365e0694af688ba8a342 100644 (file)
@@ -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;
index 828c017c00bd42aebccf6f510cc42b14f6feb420..d1ba3b414fc2c5fd2900812cb8098dd7606dcbd7 100644 (file)
@@ -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;
index 695cbb4d53b5fed84cc301ecb5e098d2afc66a8a..e74f4d8b5b10ed8bed05ffb7db9e2af3904d19e3 100644 (file)
@@ -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;
index 0db41c4bcb0787d5c7d65528f4d07c68a01b87b9..5752b90ccf27ee3fee38014cd8b88066ab2f9cac 100644 (file)
@@ -482,7 +482,7 @@ failed:
 }
 
 
-BOOL torture_rpc_echo(void)
+BOOL torture_rpc_echo(struct torture_context *torture)
 {
        NTSTATUS status;
        struct dcerpc_pipe *p;
index ee11cae0849ecc9d415945b85d8e0e63bc7080b0..9e477625dbfce58a6ecd537a1a38599b335e9298 100644 (file)
@@ -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;
index 1372dd6b7331643f550f963f9e11521dd732ca85..381b34a49c79a1a847f1159b97577a449c7bd400 100644 (file)
@@ -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;
index 2652ad6cfb6944bd8084c89fcb71c1a24655d758..17589040cc05471a151a67e66cef0b06eef1822d 100644 (file)
@@ -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;
index 2a3c26087f673704b4017377df411a8b94ababb5..0cb0f09ad58f757da881987122553dbdb302c101 100644 (file)
@@ -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;
index 61ab4bdc4989bc6a6670ab98a712f027179c75e6..ffc1863f22f53a806e33c560644ff4fcff35103d 100644 (file)
@@ -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;
index 0dc3c38916b7c176fb973a48affacb2e22ba998a..fa2bc724e57fed7c7e881359224ae6ff0954209c 100644 (file)
@@ -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;
index 653c49d03841d991f31257839d61beaf5ca3d94f..db503b37750d072f4eb8e2f3272db3c1e74bebed 100644 (file)
@@ -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;
index 14e7a49305a01e58f6f5a927a8787558ec45a788..b66ea719cc6612409a3d91b919566f24685b1b28 100644 (file)
@@ -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;
index 4004476a2220edafea5cbbbcee294bca97d75198..c56d4b6e868b081cc71e6538747d362805d9bb3b 100644 (file)
@@ -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;
index ed7c1935a2c65b90a3de5f926a5b5b79483e80fc..067073f5016175aa22580a64666be004e56eb3d3 100644 (file)
@@ -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;
index 48a8717fa53e5ff66c9f021d56167fd7f76b70d4..f57736e1c7e81ea46b9af04cda990a120ac624d0 100644 (file)
@@ -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;
index 78d0860f2341c425d53a0adcbc2a791455b64de2..349ee93ab9a7657e84d0493472e56e5bdebc7e35 100644 (file)
@@ -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"
index cca1cdeb98978ca1ef77e78f255e3ffcf125cdc4..198cbae2320fcf2151affb1ffcf6a66f80fad06a 100644 (file)
@@ -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;
index 588450e30cee02f0504f4b3888382da8377c9ed2..3501ab300d31d58806c0e1bf5d7d3ae741adef87 100644 (file)
@@ -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;
index 0d8fb0b5d552e432e7ff3f53d2d5a9cbbde776cc..b61282d37e07263aee02c36438b0866db7d6cdf9 100644 (file)
@@ -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;
index 85fc95aa6309aa2a6ed087f3050d9cfd57a7867d..765151f1b899c3afd123547bf5a57450ffc51c1c 100644 (file)
@@ -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;
index cb3723f995eaeb3e6c4ae7202ed2075d1940d3cc..b8145437309e70f5f29f6e836ce621a387112e0d 100644 (file)
@@ -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;
index 60a924da1d1ff51dbdee09701502d48f04b17d49..1d0274199440cb41fe5a01dd36b4dc046931523f 100644 (file)
@@ -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;
index eb73bfa36b0a609a73dda535da1888e96391ce3a..4011c2bc6cabcdd4a04aac259dd51f459815751c 100644 (file)
@@ -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;
index c9aa22c4bc960de8660308825a06840225b1e6f6..41b27df2051dbf72bef19d4e600ab86165a2345d 100644 (file)
@@ -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;
index dbdce859f88a81affdd48b1112d21686a7b6528f..6c15249950f3cdd1218a2cab2edbf8521e2ac7c7 100644 (file)
@@ -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;
index b351c397e83c9aefb2af745ef1d8acdd62b30b5c..3eafb17c44f5a3af5243dd27714f80d385f98df6 100644 (file)
@@ -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;
index 8d1ead59e4a892adb3dba839d5d5d237c2484db4..e477c25e3eabeb347a85e87c36849096030f7474 100644 (file)
@@ -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;
index 5e5975cf6260ffdcae9e7bf6f30d168852a79467..9d336e81777debb6cdda9a17f77169321c73a69e 100644 (file)
@@ -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;
index 10b7046375db3f7ddac1ced1cbca76d7aad7f173..349fcda9925afefec38cb02b291d477b9bebd17b 100644 (file)
@@ -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;
index 19e41fdc7e48271222f9d8ac55f65017cf7354c0..49b4030c07d7c168af35cf86c3749c4be3a7da1f 100644 (file)
@@ -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;
index f52025c702f38e23f9f0804113d5099762f53298..dac6225381eff35fd82ce79724686a4c1a4d0582 100644 (file)
@@ -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;
index 44dced94277ffd84572ace35c813c12fc322180d..28e83541c7c40e2d6f28acb74f2c0bff3b602f65 100644 (file)
@@ -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;
index e046d70acffbcb43e7ead4e7c2fa599e671ad1ad..18cf841f1576dbc3c0f2fc67f6e46cde337d7867 100644 (file)
@@ -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;
index c2f4f84fac9afc39725b96ce8dafa7884b0e526b..1520ff741c2bb50496830109373b772e86d5b80a 100644 (file)
@@ -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);
                                }
index 47b031f677f01d1f6fbcde5eefcfc994b2599b94..6c1f8ea01980902c3a7fd7faa8d26f171c963f7f 100644 (file)
@@ -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;
        
index 9d0f84759b193877064b5fac67eb5790e647e569..271a9bf4a33cc91179b158acdba748b993cb6312 100644 (file)
 #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"
index ef4b45b77d35881cf1b22a8569d16ecefca7f1a1..0ab8d4e8da8b85449d1420fd4575d16c76f2faa7 100644 (file)
@@ -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;