summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-10 08:00:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:58 -0500
commitb7c5bc522b286e8e478b6f74a68bc68829e64c3c (patch)
tree9a98f20f035f906be11697a1e8cc37248f15142d /source4/torture
parent56bb8f40623be28f385ff5bb8d39ab0a4f657de5 (diff)
downloadsamba-b7c5bc522b286e8e478b6f74a68bc68829e64c3c.tar.gz
samba-b7c5bc522b286e8e478b6f74a68bc68829e64c3c.tar.bz2
samba-b7c5bc522b286e8e478b6f74a68bc68829e64c3c.zip
r16907: Add an index parameter to torture_open_connection. Next step is to enable the
unclist parameter for all tests that do two connections, to enable cluster testing. Volker (This used to be commit a5d6db09244d444986f8fded3fc6e72c74c8ca1f)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/aliases.c2
-rw-r--r--source4/torture/basic/attr.c2
-rw-r--r--source4/torture/basic/base.c30
-rw-r--r--source4/torture/basic/charset.c2
-rw-r--r--source4/torture/basic/delaywrite.c6
-rw-r--r--source4/torture/basic/delete.c6
-rw-r--r--source4/torture/basic/denytest.c15
-rw-r--r--source4/torture/basic/dir.c4
-rw-r--r--source4/torture/basic/disconnect.c6
-rw-r--r--source4/torture/basic/locking.c18
-rw-r--r--source4/torture/basic/mangle_test.c2
-rw-r--r--source4/torture/basic/properties.c2
-rw-r--r--source4/torture/basic/rename.c2
-rw-r--r--source4/torture/basic/scanner.c6
-rw-r--r--source4/torture/basic/secleak.c2
-rw-r--r--source4/torture/basic/unlink.c2
-rw-r--r--source4/torture/basic/utable.c4
-rw-r--r--source4/torture/misc.c6
-rw-r--r--source4/torture/nbench/nbench.c2
-rw-r--r--source4/torture/rap/rap.c4
-rw-r--r--source4/torture/raw/acls.c2
-rw-r--r--source4/torture/raw/chkpath.c2
-rw-r--r--source4/torture/raw/close.c2
-rw-r--r--source4/torture/raw/composite.c2
-rw-r--r--source4/torture/raw/context.c2
-rw-r--r--source4/torture/raw/eas.c4
-rw-r--r--source4/torture/raw/ioctl.c2
-rw-r--r--source4/torture/raw/lock.c2
-rw-r--r--source4/torture/raw/mkdir.c2
-rw-r--r--source4/torture/raw/mux.c2
-rw-r--r--source4/torture/raw/notify.c8
-rw-r--r--source4/torture/raw/open.c2
-rw-r--r--source4/torture/raw/oplock.c2
-rw-r--r--source4/torture/raw/qfileinfo.c2
-rw-r--r--source4/torture/raw/qfsinfo.c2
-rw-r--r--source4/torture/raw/read.c2
-rw-r--r--source4/torture/raw/rename.c2
-rw-r--r--source4/torture/raw/samba3misc.c7
-rw-r--r--source4/torture/raw/search.c2
-rw-r--r--source4/torture/raw/seek.c2
-rw-r--r--source4/torture/raw/setfileinfo.c4
-rw-r--r--source4/torture/raw/streams.c2
-rw-r--r--source4/torture/raw/unlink.c2
-rw-r--r--source4/torture/raw/write.c2
-rw-r--r--source4/torture/util_smb.c4
45 files changed, 97 insertions, 93 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 00262e5e11..8fdb2999ea 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -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;
}
diff --git a/source4/torture/basic/attr.c b/source4/torture/basic/attr.c
index b66adfaa5b..a98f815a92 100644
--- a/source4/torture/basic/attr.c
+++ b/source4/torture/basic/attr.c
@@ -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;
}
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 55f0b6e543..1275ab08e3 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -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;
}
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index 016d6a8a5e..44875c6b8f 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -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;
}
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 4063eda6f2..e42ca1239d 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -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;
}
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index a71fed32b7..d3f7de201f 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -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;
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 9b9be967b1..86186c5667 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -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;
}
diff --git a/source4/torture/basic/dir.c b/source4/torture/basic/dir.c
index 7e6f200ea4..01d25e5d4a 100644
--- a/source4/torture/basic/dir.c
+++ b/source4/torture/basic/dir.c
@@ -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;
}
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 7284f3c959..4712dfdda9 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -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;
}
}
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c
index 1ee7572967..c4aae64ca8 100644
--- a/source4/torture/basic/locking.c
+++ b/source4/torture/basic/locking.c
@@ -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;
}
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 5f2a07e02f..7e17adece7 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -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;
}
diff --git a/source4/torture/basic/properties.c b/source4/torture/basic/properties.c
index 3eb05149ab..63941263ae 100644
--- a/source4/torture/basic/properties.c
+++ b/source4/torture/basic/properties.c
@@ -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;
}
diff --git a/source4/torture/basic/rename.c b/source4/torture/basic/rename.c
index 477b367745..b80c909470 100644
--- a/source4/torture/basic/rename.c
+++ b/source4/torture/basic/rename.c
@@ -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;
}
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index d936173590..47da8f7efe 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -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;
}
diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c
index 3e5699ab29..78267b0295 100644
--- a/source4/torture/basic/secleak.c
+++ b/source4/torture/basic/secleak.c
@@ -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;
}
diff --git a/source4/torture/basic/unlink.c b/source4/torture/basic/unlink.c
index f5bfe66326..b64c52e110 100644
--- a/source4/torture/basic/unlink.c
+++ b/source4/torture/basic/unlink.c
@@ -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;
}
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index 7a2b3874e0..8e13babd0a 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -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;
}
diff --git a/source4/torture/misc.c b/source4/torture/misc.c
index 71dd1587cb..f77dfe3552 100644
--- a/source4/torture/misc.c
+++ b/source4/torture/misc.c
@@ -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;
}
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 3921bf66e8..47621d46a0 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -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;
}
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 3ae60f347b..f4a9876d4f 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -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;
}
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index e5e88386b0..ebad7568c4 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -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;
}
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index c4344d5c73..2e83af47db 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -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;
}
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 1a3b5f28be..5969a7f687 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -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;
}
diff --git a/source4/torture/raw/composite.c b/source4/torture/raw/composite.c
index 8d824d24f2..2dd079c4b0 100644
--- a/source4/torture/raw/composite.c
+++ b/source4/torture/raw/composite.c
@@ -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;
}
diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c
index 0c9bcc417f..2da291f2ed 100644
--- a/source4/torture/raw/context.c
+++ b/source4/torture/raw/context.c
@@ -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;
}
diff --git a/source4/torture/raw/eas.c b/source4/torture/raw/eas.c
index 0a371688c7..33e8866f33 100644
--- a/source4/torture/raw/eas.c
+++ b/source4/torture/raw/eas.c
@@ -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;
}
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index dd100e107d..65ffffdfc2 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -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;
}
diff --git a/source4/torture/raw/lock.c b/source4/torture/raw/lock.c
index a62a240355..ce0be42cf0 100644
--- a/source4/torture/raw/lock.c
+++ b/source4/torture/raw/lock.c
@@ -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;
}
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index d7b3baa2db..5223f9db3a 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -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;
}
diff --git a/source4/torture/raw/mux.c b/source4/torture/raw/mux.c
index d1302a339b..f7d8b430df 100644
--- a/source4/torture/raw/mux.c
+++ b/source4/torture/raw/mux.c
@@ -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;
}
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 486869598e..12ea821518 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -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;
}
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 2d4a6132d0..0883d9170a 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -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;
}
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 81042755a3..f1b9149244 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -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;
}
diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c
index f272190c44..7dd32d0976 100644
--- a/source4/torture/raw/qfileinfo.c
+++ b/source4/torture/raw/qfileinfo.c
@@ -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;
}
diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c
index 2baabb8e9d..175a4ed15a 100644
--- a/source4/torture/raw/qfsinfo.c
+++ b/source4/torture/raw/qfsinfo.c
@@ -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;
}
diff --git a/source4/torture/raw/read.c b/source4/torture/raw/read.c
index 81955ecafa..1e73259dec 100644
--- a/source4/torture/raw/read.c
+++ b/source4/torture/raw/read.c
@@ -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;
}
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 02a462b855..c196df3bb4 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -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;
}
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index f9f926fb11..0cbc7912ed 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -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;
}
diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c
index d4e317d9fb..6ee21d630a 100644
--- a/source4/torture/raw/search.c
+++ b/source4/torture/raw/search.c
@@ -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;
}
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index dddba15c0e..dba08f71d5 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -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;
}
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index 0e77c36b51..1bccb30094 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -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;
}
diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c
index 978a5fcc3a..d428afd01e 100644
--- a/source4/torture/raw/streams.c
+++ b/source4/torture/raw/streams.c
@@ -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;
}
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 0caf55ebf7..d73b7abacf 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -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;
}
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index 82de598f7b..468092f624 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -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;
}
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 818100aa5c..789a609275 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -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) {