summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-23 23:16:42 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-23 23:16:42 +0000
commitc50da047a1a7c64d3017f9d4b12391f384205072 (patch)
tree6711697303a961de69ed21cb0915dd8c83f79b70 /source3/torture
parentf3c1c25b97254c89e637e14d535ba97e1717e76c (diff)
downloadsamba-c50da047a1a7c64d3017f9d4b12391f384205072.tar.gz
samba-c50da047a1a7c64d3017f9d4b12391f384205072.tar.bz2
samba-c50da047a1a7c64d3017f9d4b12391f384205072.zip
more minor torture updates
(This used to be commit 6513b94d19adab8f94bbd8044338658242188e7a)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/masktest.c1
-rw-r--r--source3/torture/torture.c18
2 files changed, 15 insertions, 4 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 097d8c1c43..92fa427a1f 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -400,6 +400,7 @@ static void usage(void)
-W workgroup\n\
-U user%%pass\n\
-s seed\n\
+ -M max protocol\n\
-f filechars (default %s)\n\
-m maskchars (default %s)\n\
-a show all tests\n\
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 525b7644ae..cd35abdbc6 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1777,6 +1777,9 @@ static BOOL run_unlinktest(int dummy)
if (cli_unlink(&cli, fname)) {
printf("error: server allowed unlink on an open file\n");
correct = False;
+ } else {
+ correct = check_error(__LINE__, &cli, ERRDOS, ERRbadshare,
+ NT_STATUS_SHARING_VIOLATION);
}
cli_close(&cli, fnum);
@@ -1823,9 +1826,9 @@ static BOOL run_maxfidtest(int dummy)
printf("maximum fnum is %d\n", i);
break;
}
- if (i % 100 == 0) printf("%d\r", i);
+ printf("%6d\r", i);
}
- printf("%d\n", i);
+ printf("%6d\n", i);
printf("cleaning up\n");
for (;i>=0;i--) {
@@ -1836,7 +1839,9 @@ static BOOL run_maxfidtest(int dummy)
fname, cli_errstr(&cli));
correct = False;
}
+ printf("%6d\r", i);
}
+ printf("%6d\n", 0);
printf("maxfid test finished\n");
if (!close_connection(&cli)) {
@@ -1891,6 +1896,7 @@ static BOOL run_randomipc(int dummy)
int api, param_len, i;
static struct cli_state cli;
BOOL correct = True;
+ int count = 50000;
printf("starting random ipc test\n");
@@ -1898,7 +1904,7 @@ static BOOL run_randomipc(int dummy)
return False;
}
- for (i=0;i<50000;i++) {
+ for (i=0;i<count;i++) {
api = sys_random() % 500;
param_len = (sys_random() % 64);
@@ -1911,7 +1917,11 @@ static BOOL run_randomipc(int dummy)
NULL, 0, BUFFER_SIZE,
&rparam, &rprcnt,
&rdata, &rdrcnt);
+ if (i % 100 == 0) {
+ printf("%d/%d\r", i,count);
+ }
}
+ printf("%d/%d\n", i, count);
if (!close_connection(&cli)) {
correct = False;
@@ -2090,7 +2100,7 @@ static BOOL run_trans2test(int dummy)
}
if (abs(m_time - time(NULL)) > 60*60*24*7) {
- printf("ERROR: totally incorrect times - maybe word reversed?\n");
+ printf("ERROR: totally incorrect times - maybe word reversed? mtime=%s", ctime(&m_time));
correct = False;
}
}