summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/basic')
-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
17 files changed, 59 insertions, 52 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;
}