summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-29 21:37:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:47 -0500
commit628ff1bea3e167e2d45dffbffb3c4fffaa3d1916 (patch)
treeb35b49695a07cd8391f334eda49edb11edb80c1d /source4/torture/basic
parent1e84e4026e3c8f0b94cfaf61a089b075f07417f1 (diff)
downloadsamba-628ff1bea3e167e2d45dffbffb3c4fffaa3d1916.tar.gz
samba-628ff1bea3e167e2d45dffbffb3c4fffaa3d1916.tar.bz2
samba-628ff1bea3e167e2d45dffbffb3c4fffaa3d1916.zip
r22579: disable progress printing in the build-farm
metze (This used to be commit 93089ad5e8b6e20c4fa92bf13b0137765aeac689)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/base.c4
-rw-r--r--source4/torture/basic/denytest.c6
-rw-r--r--source4/torture/basic/mangle_test.c6
-rw-r--r--source4/torture/basic/misc.c27
-rw-r--r--source4/torture/basic/utable.c5
5 files changed, 35 insertions, 13 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index dcec1bbfb5..5fdc2cf421 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -567,7 +567,9 @@ static BOOL rw_torture2(struct torture_context *tctx,
{
size_t buf_size = ((uint_t)random()%(sizeof(buf)-1))+ 1;
if (i % 10 == 0) {
- torture_comment(tctx, "%d\r", i); fflush(stdout);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%d\r", i); fflush(stdout);
+ }
}
generate_random_buffer(buf, buf_size);
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 3d91058174..19431ae360 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -1402,8 +1402,10 @@ static const struct {
static void progress_bar(struct torture_context *tctx, uint_t i, uint_t total)
{
- torture_comment(tctx, "%5d/%5d\r", i, total);
- fflush(stdout);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%5d/%5d\r", i, total);
+ fflush(stdout);
+ }
}
/*
diff --git a/source4/torture/basic/mangle_test.c b/source4/torture/basic/mangle_test.c
index 68ee0b63f5..98a0d07efb 100644
--- a/source4/torture/basic/mangle_test.c
+++ b/source4/torture/basic/mangle_test.c
@@ -184,8 +184,10 @@ BOOL torture_mangle(struct torture_context *torture,
break;
}
if (total && total % 100 == 0) {
- printf("collisions %u/%u - %.2f%% (%u failures)\r",
- collisions, total, (100.0*collisions) / total, failures);
+ if (torture_setting_bool(torture, "progress", true)) {
+ printf("collisions %u/%u - %.2f%% (%u failures)\r",
+ collisions, total, (100.0*collisions) / total, failures);
+ }
}
}
diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c
index 9467d2fc3c..33f0b9eff6 100644
--- a/source4/torture/basic/misc.c
+++ b/source4/torture/basic/misc.c
@@ -71,7 +71,10 @@ static BOOL rw_torture(struct torture_context *tctx, struct smbcli_state *c)
for (i=0;i<torture_numops;i++) {
uint_t n = (uint_t)random()%10;
if (i % 10 == 0) {
- torture_comment(tctx, "%d\r", i); fflush(stdout);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%d\r", i);
+ fflush(stdout);
+ }
}
asprintf(&fname, "\\torture.%u", n);
@@ -162,8 +165,10 @@ BOOL run_pipe_number(struct torture_context *tctx,
break;
}
num_pipes++;
- torture_comment(tctx, "%d\r", num_pipes);
- fflush(stdout);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%d\r", num_pipes);
+ fflush(stdout);
+ }
}
torture_comment(tctx, "pipe_number test - we can open %d %s pipes.\n", num_pipes, pipe_name );
@@ -192,8 +197,10 @@ BOOL torture_holdcon(struct torture_context *tctx)
if (!torture_open_connection(&cli[i], i)) {
return False;
}
- torture_comment(tctx, "opened %d connections\r", i);
- fflush(stdout);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "opened %d connections\r", i);
+ fflush(stdout);
+ }
}
torture_comment(tctx, "\nStarting pings\n");
@@ -273,7 +280,10 @@ BOOL run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int
break;
}
free(fname);
- torture_comment(tctx, "%6d\r", i);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%6d\r", i);
+ fflush(stdout);
+ }
}
torture_comment(tctx, "%6d\n", i);
i--;
@@ -304,7 +314,10 @@ BOOL run_maxfidtest(struct torture_context *tctx, struct smbcli_state *cli, int
}
free(fname);
- torture_comment(tctx, "%6d %6d\r", i, maxfid-i);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%6d %6d\r", i, maxfid-i);
+ fflush(stdout);
+ }
}
torture_comment(tctx, "%6d\n", 0);
diff --git a/source4/torture/basic/utable.c b/source4/torture/basic/utable.c
index 28122da214..363288658e 100644
--- a/source4/torture/basic/utable.c
+++ b/source4/torture/basic/utable.c
@@ -74,7 +74,10 @@ bool torture_utable(struct torture_context *tctx,
smbcli_unlink(cli->tree, fname);
if (c % 100 == 0) {
- torture_comment(tctx, "%d (%d/%d)\r", c, chars_allowed, alt_allowed);
+ if (torture_setting_bool(tctx, "progress", true)) {
+ torture_comment(tctx, "%d (%d/%d)\r", c, chars_allowed, alt_allowed);
+ fflush(stdout);
+ }
}
}
torture_comment(tctx, "%d (%d/%d)\n", c, chars_allowed, alt_allowed);