r16907: Add an index parameter to torture_open_connection. Next step is to enable the
authorVolker Lendecke <vlendec@samba.org>
Mon, 10 Jul 2006 08:00:06 +0000 (08:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:09:58 +0000 (14:09 -0500)
unclist parameter for all tests that do two connections, to enable cluster
testing.

Volker
(This used to be commit a5d6db09244d444986f8fded3fc6e72c74c8ca1f)

45 files changed:
source4/torture/basic/aliases.c
source4/torture/basic/attr.c
source4/torture/basic/base.c
source4/torture/basic/charset.c
source4/torture/basic/delaywrite.c
source4/torture/basic/delete.c
source4/torture/basic/denytest.c
source4/torture/basic/dir.c
source4/torture/basic/disconnect.c
source4/torture/basic/locking.c
source4/torture/basic/mangle_test.c
source4/torture/basic/properties.c
source4/torture/basic/rename.c
source4/torture/basic/scanner.c
source4/torture/basic/secleak.c
source4/torture/basic/unlink.c
source4/torture/basic/utable.c
source4/torture/misc.c
source4/torture/nbench/nbench.c
source4/torture/rap/rap.c
source4/torture/raw/acls.c
source4/torture/raw/chkpath.c
source4/torture/raw/close.c
source4/torture/raw/composite.c
source4/torture/raw/context.c
source4/torture/raw/eas.c
source4/torture/raw/ioctl.c
source4/torture/raw/lock.c
source4/torture/raw/mkdir.c
source4/torture/raw/mux.c
source4/torture/raw/notify.c
source4/torture/raw/open.c
source4/torture/raw/oplock.c
source4/torture/raw/qfileinfo.c
source4/torture/raw/qfsinfo.c
source4/torture/raw/read.c
source4/torture/raw/rename.c
source4/torture/raw/samba3misc.c
source4/torture/raw/search.c
source4/torture/raw/seek.c
source4/torture/raw/setfileinfo.c
source4/torture/raw/streams.c
source4/torture/raw/unlink.c
source4/torture/raw/write.c
source4/torture/util_smb.c

index 00262e5e11b38913f6aa63da72ac555fe0cb6293..8fdb2999ea1337735fbb39fc5e054dcb678f5ce5 100644 (file)
@@ -388,7 +388,7 @@ BOOL torture_trans2_aliases(struct torture_context *torture)
 {
        struct smbcli_state *cli;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index b66adfaa5bcfdea857242a3c7ac4fd5db279d17e..a98f815a929d9b20286e5065fd654471c92209df 100644 (file)
@@ -99,7 +99,7 @@ BOOL torture_openattrtest(struct torture_context *torture)
 
        printf("starting open attr test\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
        
index 55f0b6e54394af5856da816a6efb61b7f5bb083b..1275ab08e31dcefc94be3def0f783f1f357dc1e1 100644 (file)
@@ -123,7 +123,8 @@ static BOOL run_fdpasstest(struct torture_context *torture)
        int fnum1, oldtid;
        uint8_t buf[1024];
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -184,7 +185,7 @@ static BOOL run_attrtest(struct torture_context *torture)
 
        printf("starting attrib test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -258,7 +259,7 @@ static BOOL run_trans2test(struct torture_context *torture)
 
        printf("starting trans2 test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -410,7 +411,7 @@ static BOOL run_negprot_nowait(struct torture_context *torture)
        }
 
        printf("Opening secondary connection\n");
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                printf("Failed to open secondary connection\n");
                correct = False;
        }
@@ -445,7 +446,7 @@ static BOOL run_tcon_test(struct torture_context *torture)
        const char *share = lp_parm_string(-1, "torture", "share");
        const char *password = lp_parm_string(-1, "torture", "password");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -690,7 +691,8 @@ static BOOL run_readwritetest(struct torture_context *torture)
        struct smbcli_state *cli1, *cli2;
        BOOL test1, test2 = True;
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -808,7 +810,7 @@ static BOOL run_vuidtest(struct torture_context *torture)
 
        printf("starting vuid test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -877,7 +879,7 @@ static BOOL run_vuidtest(struct torture_context *torture)
 
        printf("starting open test\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
        
@@ -1054,7 +1056,7 @@ error_test3:
 error_test4:   
        /* Test the non-io opens... */
 
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                return False;
        }
        
@@ -1406,7 +1408,7 @@ static BOOL run_xcopy(struct torture_context *torture)
 
        printf("starting xcopy test\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
        
@@ -1453,7 +1455,7 @@ static BOOL run_iometer(struct torture_context *torture)
 
        memset(buf, 0, sizeof(buf));
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -1533,7 +1535,7 @@ static BOOL torture_chkpath_test(struct torture_context *torture)
        int fnum;
        BOOL ret;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -1636,7 +1638,7 @@ static BOOL torture_samba3_errorpaths(struct torture_context *torture)
                goto fail;
        }
 
-       if (!torture_open_connection(&cli_nt)) {
+       if (!torture_open_connection(&cli_nt, 0)) {
                goto fail;
        }
 
@@ -1645,7 +1647,7 @@ static BOOL torture_samba3_errorpaths(struct torture_context *torture)
                goto fail;
        }
 
-       if (!torture_open_connection(&cli_dos)) {
+       if (!torture_open_connection(&cli_dos, 1)) {
                goto fail;
        }
 
index 016d6a8a5ede142a8cbebec7395103a251270ecb..44875c6b8fdd30d97b81664ff60ac4ebfbf6316e 100644 (file)
@@ -237,7 +237,7 @@ BOOL torture_charset(struct torture_context *torture)
 
        mem_ctx = talloc_init("torture_charset");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 4063eda6f27ab70a13927b6574e0521dd3963f35..e42ca1239d44e1a92a459bed74ea5ba0e773a429 100644 (file)
@@ -134,7 +134,7 @@ static BOOL test_delayed_write_update2(struct smbcli_state *cli, TALLOC_CTX *mem
 
        printf("Testing delayed update of write time using 2 connections\n");
 
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -525,7 +525,7 @@ static BOOL test_finfo_after_write(struct smbcli_state *cli, TALLOC_CTX *mem_ctx
                goto done;
        }
 
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -632,7 +632,7 @@ BOOL torture_delay_write(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index a71fed32b74652e1a8e95137ead3bb57ce461b57..d3f7de201f91344ae702720bbd47fceab7e9f4e7 100644 (file)
@@ -1596,7 +1596,7 @@ static BOOL deltest21(struct smbcli_state **ppcli1, struct smbcli_state **ppcli2
 
        fnum1 = -1;
 
-       if (!torture_open_connection(ppcli1)) {
+       if (!torture_open_connection(ppcli1, 0)) {
                return False;
        }
 
@@ -1636,11 +1636,11 @@ BOOL torture_test_delete(struct torture_context *torture)
        
        printf("starting delete test\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
 
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                printf("(%s) failed to open second connection.\n",
                       __location__);
                correct = False;
index 9b9be967b1a27c852a0a562380ee387f4a5d1087..86186c56671cf4a8a76120ad122de0012cf1dd18 100644 (file)
@@ -1420,7 +1420,7 @@ BOOL torture_denytest1(struct torture_context *torture)
        const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
        int failures=0;
 
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
 
@@ -1519,7 +1519,8 @@ BOOL torture_denytest2(struct torture_context *torture)
        struct timeval tv, tv_start;
        int failures=0;
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -1620,10 +1621,10 @@ BOOL torture_denytest3(struct torture_context *torture)
 
        printf("Testing simple deny modes\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -1943,11 +1944,11 @@ BOOL torture_ntdenytest2(struct torture_context *torture)
        struct smbcli_state *cli1, *cli2;
        BOOL ret;
 
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
 
-       if (!torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -1992,7 +1993,7 @@ BOOL torture_denydos_sharing(struct torture_context *torture)
        union smb_setfileinfo sfinfo;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 7e6f200ea47333cb5aee7871f43673edc1de8d79..01d25e5d4a51c372d11ed3698e51df1fe8d78ea2 100644 (file)
@@ -45,7 +45,7 @@ BOOL torture_dirtest1(struct torture_context *torture)
 
        printf("starting dirtest1\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -99,7 +99,7 @@ BOOL torture_dirtest2(struct torture_context *torture)
 
        printf("starting dirtest2\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 7284f3c959553e3da94e339bcf5cab1f0a7b45ba..4712dfdda916de386189aebdb47c8ae1cd33f589 100644 (file)
@@ -137,7 +137,7 @@ BOOL torture_disconnect(struct torture_context *torture)
 
        mem_ctx = talloc_init("torture_raw_mux");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -147,12 +147,12 @@ BOOL torture_disconnect(struct torture_context *torture)
 
        for (i=0;i<torture_numops;i++) {
                ret &= test_disconnect_lock(cli, mem_ctx);
-               if (!torture_open_connection(&cli)) {
+               if (!torture_open_connection(&cli, 0)) {
                        return False;
                }
 
                ret &= test_disconnect_open(cli, mem_ctx);
-               if (!torture_open_connection(&cli)) {
+               if (!torture_open_connection(&cli, 0)) {
                        return False;
                }
        }
index 1ee7572967b8937943a456fa3f7a32c5c1e50c2a..c4aae64ca82a6253dd24926b859fdda09d4e95a0 100644 (file)
@@ -46,7 +46,8 @@ BOOL torture_locktest1(struct torture_context *torture)
        time_t t1, t2;
        uint_t lock_timeout;
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -202,7 +203,7 @@ BOOL torture_locktest2(struct torture_context *torture)
        int fnum1, fnum2, fnum3;
        BOOL correct = True;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -347,7 +348,8 @@ BOOL torture_locktest3(struct torture_context *torture)
 
 #define NEXT_OFFSET offset += (~(uint32_t)0) / torture_numops
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -479,7 +481,8 @@ BOOL torture_locktest4(struct torture_context *torture)
        uint8_t buf[1000];
        BOOL correct = True;
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -649,7 +652,8 @@ BOOL torture_locktest5(struct torture_context *torture)
        uint8_t buf[1000];
        BOOL correct = True;
 
-       if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+       if (!torture_open_connection(&cli1, 0) ||
+           !torture_open_connection(&cli2, 1)) {
                return False;
        }
 
@@ -771,7 +775,7 @@ BOOL torture_locktest6(struct torture_context *torture)
        int fnum;
        NTSTATUS status;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -815,7 +819,7 @@ BOOL torture_locktest7(struct torture_context *torture)
        uint8_t buf[200];
        BOOL correct = False;
 
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
 
index 5f2a07e02fc058f978c4c5d43bd2c156f6f0a673..7e17adece714f61636931512384d485150934a4a 100644 (file)
@@ -163,7 +163,7 @@ BOOL torture_mangle(struct torture_context *torture)
 
        printf("starting mangle test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 3eb05149ab9fc8d76256a1b7daddfa7d259893d5..63941263aef992362dac3ca5a33ff04a9a9f5fac 100644 (file)
@@ -100,7 +100,7 @@ BOOL torture_test_properties(struct torture_context *torture)
        
        ZERO_STRUCT(cli);
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
        
index 477b367745e296ea44ed35b0aad6908a14ad1bb7..b80c90947066819a3f39a045b50e255f2cbc91b0 100644 (file)
@@ -38,7 +38,7 @@ BOOL torture_test_rename(struct torture_context *torture)
 
        printf("starting rename test\n");
        
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
        
index d9361735904d02f87283a6c91d9f30231115cddd..47da8f7efea0e744c121e145e120c710ea335803 100644 (file)
@@ -251,7 +251,7 @@ BOOL torture_trans2_scan(struct torture_context *torture)
 
        printf("starting trans2 scan test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -492,7 +492,7 @@ BOOL torture_nttrans_scan(struct torture_context *torture)
 
        printf("starting nttrans scan test\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -533,7 +533,7 @@ BOOL torture_smb_scan(struct torture_context *torture)
        for (op=0x0;op<=0xFF;op++) {
                if (op == SMBreadbraw) continue;
 
-               if (!torture_open_connection(&cli)) {
+               if (!torture_open_connection(&cli, 0)) {
                        return False;
                }
 
index 3e5699ab29b4a3af1f9137624a257da8311ca253..78267b0295290c954f6f55f3ce320bdd52ac3031 100644 (file)
@@ -62,7 +62,7 @@ BOOL torture_sec_leak(struct torture_context *torture)
        time_t t1 = time(NULL);
        int timelimit = lp_parm_int(-1, "torture", "timelimit", 20);
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index f5bfe66326e697730cb3eb49f2a4af8f48672e27..b64c52e110610684dbb4fb115a1341f12cbf9958 100644 (file)
@@ -43,7 +43,7 @@ BOOL torture_unlinktest(struct torture_context *torture)
        union smb_open io;
        NTSTATUS status;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 7a2b3874e01dc39a72165111bff022cec94275b1..8e13babd0a92b07db27a9ffa28aa92a07b45fce1 100644 (file)
@@ -41,7 +41,7 @@ BOOL torture_utable(struct torture_context *torture)
 
        printf("Generating valid character table\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -131,7 +131,7 @@ BOOL torture_casetable(struct torture_context *torture)
        codepoint_t equiv[0x10000][MAX_EQUIVALENCE];
        printf("starting casetable\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 71dd1587cb0b279418562cb5b7ddd2f3166f26ad..f77dfe355242ed18f33a651a7c2494a2c2513694 100644 (file)
@@ -157,7 +157,7 @@ static BOOL run_pipe_number(struct torture_context *torture)
        int num_pipes = 0;
 
        printf("starting pipenumber test\n");
-       if (!torture_open_connection(&cli1)) {
+       if (!torture_open_connection(&cli1, 0)) {
                return False;
        }
 
@@ -198,7 +198,7 @@ static BOOL run_pipe_number(struct torture_context *torture)
        cli = malloc_array_p(struct smbcli_state *, torture_numops);
 
        for (i=0;i<torture_numops;i++) {
-               if (!torture_open_connection(&cli[i])) {
+               if (!torture_open_connection(&cli[i], i)) {
                        return False;
                }
                printf("opened %d connections\r", i);
@@ -346,7 +346,7 @@ static BOOL torture_ioctl_test(struct torture_context *torture)
        union smb_ioctl parms;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 3921bf66e846e0b4ba9692477be4716d6c822611..47621d46a06e215634280700611f762651540c9d 100644 (file)
@@ -187,7 +187,7 @@ BOOL torture_nbench(struct torture_context *torture)
        }
 
        if (torture_nprocs > 1) {
-               if (!torture_open_connection(&cli)) {
+               if (!torture_open_connection(&cli, 0)) {
                        return False;
                }
 
index 3ae60f347bd4617b646a965c57ea04d30fe377fb..f4a9876d4f9a3cf7106cef02b4466b64e13c5c56 100644 (file)
@@ -434,7 +434,7 @@ BOOL torture_rap_basic(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -458,7 +458,7 @@ BOOL torture_rap_scan(struct torture_context *torture)
 
        mem_ctx = talloc_init("torture_rap_scan");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
        
index e5e88386b0baa7e684744ee05589feb91e5f538a..ebad7568c496f89d43037d3c8fb9ae28c1e98f43 100644 (file)
@@ -1733,7 +1733,7 @@ BOOL torture_raw_acls(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index c4344d5c7320db8610e1557eabfc2868cfd63d94..2e83af47db87e069743ed824449fdf747a6ec99a 100644 (file)
@@ -222,7 +222,7 @@ BOOL torture_raw_chkpath(struct torture_context *torture)
        int fnum;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 1a3b5f28bee290cd1cae6ebb8ac4bec95e433998..5969a7f68798ae52fc3ee7feb33fbfc44369702c 100644 (file)
@@ -41,7 +41,7 @@ BOOL torture_raw_close(struct torture_context *torture)
        union smb_fileinfo finfo, finfo2;
        NTSTATUS status;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 8d824d24f2a2f62d6deb6ff161649f74cc9ae8eb..2dd079c4b03c999adcc4e1918c4acab8b4730a56 100644 (file)
@@ -398,7 +398,7 @@ BOOL torture_raw_composite(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 0c9bcc417f8bc036c75bc31dd38daa6c70ec3e20..2da291f2edccd76bbdf2107f9a906f83d81ed5db 100644 (file)
@@ -877,7 +877,7 @@ static BOOL torture_raw_context_int(void)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 0a371688c75b7274e4678ed9624fa68995b5ef26..33e8866f33350bee7fa8d8580e77c419d6406e31 100644 (file)
@@ -451,7 +451,7 @@ BOOL torture_raw_eas(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -480,7 +480,7 @@ BOOL torture_max_eas(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index dd100e107d1004680c49ddfba802cc20c7ef5b69..65ffffdfc20aa5c89895f28b667bfa8edc3d496e 100644 (file)
@@ -158,7 +158,7 @@ BOOL torture_raw_ioctl(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index a62a240355a7570735a759e49d0bd45f50315732..ce0be42cf0ead6148c5a08d826a3617f8d160133 100644 (file)
@@ -1340,7 +1340,7 @@ BOOL torture_raw_lock(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index d7b3baa2dba56f174cfb1d858590e37846e759ff..5223f9db3af466633455285ed3e2b3959c9b2602 100644 (file)
@@ -151,7 +151,7 @@ BOOL torture_raw_mkdir(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index d1302a339b849e9078f8c8befabe815128d7f65a..f7d8b430df96d84a3f54c191e2656174baed37b1 100644 (file)
@@ -313,7 +313,7 @@ BOOL torture_raw_mux(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
                
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 486869598ec0e98187b3c9b47bb238d17f012425..12ea8215189ec5162fa1f846b08aaf4e1cbfb76d 100644 (file)
@@ -666,7 +666,7 @@ static BOOL test_notify_tdis(TALLOC_CTX *mem_ctx)
 
        printf("TESTING CHANGE NOTIFY FOLLOWED BY TDIS\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -726,7 +726,7 @@ static BOOL test_notify_exit(TALLOC_CTX *mem_ctx)
 
        printf("TESTING CHANGE NOTIFY FOLLOWED BY EXIT\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -786,7 +786,7 @@ static BOOL test_notify_ulogoff(TALLOC_CTX *mem_ctx)
 
        printf("TESTING CHANGE NOTIFY FOLLOWED BY ULOGOFF\n");
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -1018,7 +1018,7 @@ BOOL torture_raw_notify(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
                
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 2d4a6132d0d2fc0f3ec92d56c03787bbcce54f00..0883d9170a5fc9403daf6d5f89042a45fd26a3c3 100644 (file)
@@ -1399,7 +1399,7 @@ BOOL torture_raw_open(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 81042755a3ab73d864b25186a184ee2531ba7102..f1b914924495fa59197980e27eef3c8428e06902 100644 (file)
@@ -656,7 +656,7 @@ BOOL torture_raw_oplock(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index f272190c44bb1380bc5c21fe1a755f1973bfd839..7dd32d097645c0f5d6fcf48d70ab897ba45e589f 100644 (file)
@@ -167,7 +167,7 @@ BOOL torture_raw_qfileinfo(struct torture_context *torture)
        const char *correct_name;
        BOOL skip_streams = False;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 2baabb8e9de7a1caeb61fcfffce81142bb23533b..175a4ed15a6bf60956a0e666f56b6e30de46fb7f 100644 (file)
@@ -130,7 +130,7 @@ BOOL torture_raw_qfsinfo(struct torture_context *torture)
        union smb_fsinfo *s1, *s2;      
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 81955ecafac4af93c8f54f2c35c01429988256db..1e73259dec16ac209f4a9d37383b25897f1fc295 100644 (file)
@@ -879,7 +879,7 @@ BOOL torture_raw_read(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 02a462b855e7e2756f18e5107abab642eb5c0cbf..c196df3bb4a050cbde0f1f5e139c24faaf3f8426 100644 (file)
@@ -425,7 +425,7 @@ BOOL torture_raw_rename(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index f9f926fb11f6008e4954f759bed29e81b3be40e3..0cbc7912ed66b3e916adfd214205dce0fb02655b 100644 (file)
@@ -228,9 +228,6 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
        NTSTATUS status;
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
-       ssize_t nread;
-       char buf[16];
-       struct smbcli_tree *tree2;
        BOOL nt_status_support;
 
        if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) {
@@ -245,7 +242,7 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
                goto fail;
        }
 
-       if (!torture_open_connection(&cli_nt)) {
+       if (!torture_open_connection(&cli_nt, 0)) {
                goto fail;
        }
 
@@ -254,7 +251,7 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
                goto fail;
        }
 
-       if (!torture_open_connection(&cli_dos)) {
+       if (!torture_open_connection(&cli_dos, 1)) {
                goto fail;
        }
 
index d4e317d9fbd1d118f6202ffe1cd5a216c855b4ca..6ee21d630a455b74ef224fefc991ecb5f4f4924a 100644 (file)
@@ -1415,7 +1415,7 @@ BOOL torture_raw_search(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index dddba15c0e5532ceacf590cac0a4b302b0545ecc..dba08f71d56a3e6c3a9bf729994af40866b6df24 100644 (file)
@@ -240,7 +240,7 @@ BOOL torture_raw_seek(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 0e77c36b515bbf9bfa1c109ad45c308bb547a230..1bccb30094b45eed2d6689e2296a0aad3e376d2a 100644 (file)
@@ -54,7 +54,7 @@ BOOL torture_raw_sfileinfo(struct torture_context *torture)
        asprintf(&fnum_fname, BASEDIR "\\fnum_test_%d.txt", n);
        asprintf(&fnum_fname_new, BASEDIR "\\fnum_test_new_%d.txt", n);
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
@@ -551,7 +551,7 @@ BOOL torture_raw_sfileinfo_bug(struct torture_context *torture)
                return True;
        }
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 978a5fcc3a9ccdde6dcf7c5fcbfbf0a919bdd17f..d428afd01ec8a644b2a71ffd0bbadfac6a7584f5 100644 (file)
@@ -220,7 +220,7 @@ BOOL torture_raw_streams(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 0caf55ebf79ae17f3831707b0cec2046886f893c..d73b7abacfe525d97de666c9a60e9a029580fc50 100644 (file)
@@ -407,7 +407,7 @@ BOOL torture_raw_unlink(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 82de598f7b3ef07a0395420f6a6f60ae18fa0262..468092f624aae12c4b90191b2db65331a24e974e 100644 (file)
@@ -682,7 +682,7 @@ BOOL torture_raw_write(struct torture_context *torture)
        BOOL ret = True;
        TALLOC_CTX *mem_ctx;
 
-       if (!torture_open_connection(&cli)) {
+       if (!torture_open_connection(&cli, 0)) {
                return False;
        }
 
index 818100aa5c6af1f7bd937a4ff9a647d9bc689832..789a609275ed931a38947090bf6f3757399d3de3 100644 (file)
@@ -482,7 +482,7 @@ BOOL torture_open_connection_share(TALLOC_CTX *mem_ctx,
        return True;
 }
 
-_PUBLIC_ BOOL torture_open_connection(struct smbcli_state **c)
+_PUBLIC_ BOOL torture_open_connection(struct smbcli_state **c, int conn_index)
 {
        const char *host = lp_parm_string(-1, "torture", "host");
        const char *share = lp_parm_string(-1, "torture", "share");
@@ -629,7 +629,7 @@ double torture_create_procs(BOOL (*fn)(struct smbcli_state *, int), BOOL *result
                                                                          NULL)) {
                                                break;
                                        }
-                               } else if (torture_open_connection(&current_cli)) {
+                               } else if (torture_open_connection(&current_cli, 0)) {
                                                break;
                                }
                                if (tries-- == 0) {