r22579: disable progress printing in the build-farm
authorStefan Metzmacher <metze@samba.org>
Sun, 29 Apr 2007 21:37:29 +0000 (21:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:51:47 +0000 (14:51 -0500)
metze
(This used to be commit 93089ad5e8b6e20c4fa92bf13b0137765aeac689)

15 files changed:
source4/torture/basic/base.c
source4/torture/basic/denytest.c
source4/torture/basic/mangle_test.c
source4/torture/basic/misc.c
source4/torture/basic/utable.c
source4/torture/ldap/cldapbench.c
source4/torture/local/iconv.c
source4/torture/nbt/query.c
source4/torture/nbt/winsbench.c
source4/torture/raw/composite.c
source4/torture/raw/lockbench.c
source4/torture/raw/openbench.c
source4/torture/raw/oplock.c
source4/torture/rpc/bench.c
source4/torture/rpc/rpc.c

index dcec1bbfb5381a4df0733f3b0322e74363a3e70f..5fdc2cf421dd96ec818d6bf31c31887fa89bf62c 100644 (file)
@@ -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);
index 3d9105817498022c1f078ac62283e1c055bcb1cf..19431ae360293e2c21dbf463265e0c2c8060aad1 100644 (file)
@@ -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);
+       }
 }
 
 /*
index 68ee0b63f550ca4145b33122d068469de78b7af5..98a0d07efb166ec40dd1a89b3f1b7537ac53011e 100644 (file)
@@ -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);
+                       }
                }
        }
 
index 9467d2fc3cf2ba90a427cfc228698ce1c3a019b1..33f0b9eff605f7c7678ab81edc79084280e2ded0 100644 (file)
@@ -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);
 
index 28122da214e5ad60548c973e13b0ad8fb3470f4e..363288658eee3d611df1b427a8b358e97bdd3183 100644 (file)
@@ -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);
index 99ab69cee409df2f0e1408e5265e2052d8bd6b44..68a23ab11938e4a6b8e226078afff6a1486b0a1b 100644 (file)
@@ -76,9 +76,12 @@ static BOOL bench_cldap(TALLOC_CTX *mem_ctx, const char *address)
                        req->async.fn = request_handler;
                        num_sent++;
                        if (num_sent % 50 == 0) {
-                               printf("%.1f queries per second (%d failures)  \r", 
-                                      state->pass_count / timeval_elapsed(&tv),
-                                      state->fail_count);
+                               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                                       printf("%.1f queries per second (%d failures)  \r", 
+                                              state->pass_count / timeval_elapsed(&tv),
+                                              state->fail_count);
+                                       fflush(stdout);
+                               }
                        }
                }
 
index f21bacf4bb95ea59bc982a4d6128b8cc28a45f5f..4c96d075c096a6c3339c24a98f930c3c96394a04 100644 (file)
@@ -315,6 +315,7 @@ static bool test_first_1m(struct torture_context *tctx)
                if (codepoint % 1000 == 0) {
                        if (torture_setting_bool(tctx, "progress", True)) {
                                torture_comment(tctx, "codepoint=%u   \r", codepoint);
+                               fflush(stdout);
                        }
                }
 
@@ -335,6 +336,7 @@ static bool test_random_5m(struct torture_context *tctx)
                if (i % 1000 == 0) {
                        if (torture_setting_bool(tctx, "progress", true)) {
                                torture_comment(tctx, "i=%u              \r", i);
+                               fflush(stdout);
                        }
                }
 
index e0bea2775c97de62b79e0d2fa370a69b42a27295..8f5ea811e12ac710ce0b0e2864b7b558aacba900 100644 (file)
@@ -78,9 +78,12 @@ static bool bench_namequery(struct torture_context *tctx)
                        req->async.private = result;
                        num_sent++;
                        if (num_sent % 1000 == 0) {
-                               torture_comment(tctx, "%.1f queries per second (%d failures)  \r", 
-                                      result->num_pass / timeval_elapsed(&tv),
-                                      result->num_fail);
+                               if (torture_setting_bool(tctx, "progress", true)) {
+                                       torture_comment(tctx, "%.1f queries per second (%d failures)  \r", 
+                                              result->num_pass / timeval_elapsed(&tv),
+                                              result->num_fail);
+                                       fflush(stdout);
+                               }
                        }
                }
 
index dc349cb1eb2f69484cff86f9f0e523c79360f329..6a9d2654047a22307b7b86eae907d44593d24805 100644 (file)
@@ -254,9 +254,12 @@ static bool bench_wins(struct torture_context *tctx)
                        generate_request(nbtsock, state, num_sent % state->num_names);
                        num_sent++;
                        if (num_sent % 50 == 0) {
-                               torture_comment(tctx, "%.1f queries per second (%d failures)  \r", 
-                                      state->pass_count / timeval_elapsed(&tv),
-                                      state->fail_count);
+                               if (torture_setting_bool(tctx, "progress", true)) {
+                                       torture_comment(tctx, "%.1f queries per second (%d failures)  \r", 
+                                              state->pass_count / timeval_elapsed(&tv),
+                                              state->fail_count);
+                                       fflush(stdout);
+                               }
                        }
                }
 
index 2dd079c4b03c999adcc4e1918c4acab8b4730a56..b551af00b123aa13b03bd25d8f837ce5948c985c 100644 (file)
@@ -87,8 +87,10 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("waiting for completion\n");
        while (*count != num_ops) {
                event_loop_once(cli->transport->socket->event.ctx);
-               printf("count=%d\r", *count);
-               fflush(stdout);
+               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                       printf("count=%d\r", *count);
+                       fflush(stdout);
+               }
        }
        printf("count=%d\n", *count);
        
@@ -175,8 +177,10 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        while (*count != torture_numops) {
                event_loop_once(event_ctx);
-               printf("count=%d\r", *count);
-               fflush(stdout);
+               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                       printf("count=%d\r", *count);
+                       fflush(stdout);
+               }
        }
        printf("count=%d\n", *count);
 
@@ -293,8 +297,10 @@ static BOOL test_appendacl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("waiting for completion\n");
        while (*count != num_ops) {
                event_loop_once(event_ctx);
-               printf("count=%d\r", *count);
-               fflush(stdout);
+               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                       printf("count=%d\r", *count);
+                       fflush(stdout);
+               }
        }
        printf("count=%d\n", *count);
 
@@ -358,8 +364,10 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        while (*count < torture_numops) {
                event_loop_once(event_ctx);
-               printf("count=%d\r", *count);
-               fflush(stdout);
+               if (lp_parm_bool(-1, "torture", "progress", true)) {
+                       printf("count=%d\r", *count);
+                       fflush(stdout);
+               }
        }
        printf("count=%d\n", *count);
 
index 4dbefd5d9b1d63fce2f9e36e12f5b6a41755f9a6..3d02e0f5c4a192453cff60c812713446915130f9 100644 (file)
@@ -171,8 +171,11 @@ BOOL torture_bench_lock(struct torture_context *torture)
                for (i=0;i<nprocs;i++) {
                        total += state[i].count;
                }
-               printf("%.2f ops/second\r", total/timeval_elapsed(&tv));
-               fflush(stdout);
+
+               if (torture_setting_bool(torture, "progress", true)) {
+                       printf("%.2f ops/second\r", total/timeval_elapsed(&tv));
+                       fflush(stdout);
+               }
        }
 
        printf("%.2f ops/second\n", total/timeval_elapsed(&tv));
index a7f95d7c53d6fc460b130f48a4a88167ba197c2e..9867a407ec36e49ba17c58e5062b6daa0c467c11 100644 (file)
@@ -209,9 +209,11 @@ BOOL torture_bench_open(struct torture_context *torture)
 
                if (loops++ % 1000 != 0) continue;
 
-               printf("%.2f ops/second (%d retries)\r", 
-                      total/timeval_elapsed(&tv), open_retries);
-               fflush(stdout);
+               if (torture_setting_bool(torture, "progress", true)) {
+                       printf("%.2f ops/second (%d retries)\r", 
+                              total/timeval_elapsed(&tv), open_retries);
+                       fflush(stdout);
+               }
        }
 
        printf("%.2f ops/second (%d retries)\n", 
index 1e677fad453086c202c4f489c95c388e5a87e4c9..c02b58a9de3359b7ed0e141b5ac2fbd7c1443dff 100644 (file)
@@ -827,7 +827,10 @@ BOOL torture_bench_oplock(struct torture_context *torture)
                        CHECK_STATUS(torture, status, NT_STATUS_OK);
                        count++;
                }
-               torture_comment(torture, "%.2f ops/second\r", count/timeval_elapsed(&tv));
+
+               if (torture_setting_bool(torture, "progress", true)) {
+                       torture_comment(torture, "%.2f ops/second\r", count/timeval_elapsed(&tv));
+               }
        }
 
        torture_comment(torture, "%.2f ops/second\n", count/timeval_elapsed(&tv));
index 92b6f513bded773689249e5df4dae8e19d4fb9e0..e847a3d9c0ec4f5446abc0f87315f200dea27d13 100644 (file)
@@ -82,8 +82,10 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                talloc_free(tmp_ctx);
                count++;
                if (count % 50 == 0) {
-                       printf("%.1f queries per second  \r", 
-                              count / timeval_elapsed(&tv));
+                       if (lp_parm_bool(-1, "torture", "progress", true)) {
+                               printf("%.1f queries per second  \r", 
+                                      count / timeval_elapsed(&tv));
+                       }
                }
        }
 
index c3060d08d7261ac7b0d7a70e5c5ad3f4530e1186..ae5b63e982ec3ef6c364af50e5200a827af70bef 100644 (file)
@@ -175,6 +175,7 @@ NTSTATUS torture_rpc_init(void)
        torture_suite_add_suite(suite, torture_rpc_atsvc());
        torture_suite_add_suite(suite, torture_rpc_wkssvc());
        torture_suite_add_suite(suite, torture_rpc_handles());
+//     torture_suite_add_suite(suite, torture_rpc_disconnect());
        torture_suite_add_simple_test(suite, "SPOOLSS", torture_rpc_spoolss);
        torture_suite_add_simple_test(suite, "SAMR", torture_rpc_samr);
        torture_suite_add_simple_test(suite, "SAMR-USERS", torture_rpc_samr_users);