From 457112e9e4c7f138aaad98807d141f999c07463d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Mar 2002 19:52:14 +0000 Subject: show a progress bar during the deny tests (This used to be commit c2c8c4e713c362d0c6864c6359d90cf6b218e545) --- source3/torture/denytest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/torture') diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c index 9ab495ec0b..045246f126 100644 --- a/source3/torture/denytest.c +++ b/source3/torture/denytest.c @@ -1396,6 +1396,13 @@ static struct { }; +static void progress_bar(unsigned i, unsigned total) +{ + if (i % 10 != 0) return; + printf("%5d/%5d\r", i, total); + fflush(stdout); +} + /* this produces a matrix of deny mode behaviour for 1 connection */ @@ -1426,6 +1433,8 @@ BOOL torture_denytest1(int dummy) enum deny_result res; char *fname = fnames[denytable1[i].isexe]; + progress_bar(i, ARRAY_SIZE(denytable1)); + fnum1 = cli_open(&cli1, fname, denytable1[i].mode1, denytable1[i].deny1); @@ -1508,6 +1517,8 @@ BOOL torture_denytest2(int dummy) enum deny_result res; char *fname = fnames[denytable2[i].isexe]; + progress_bar(i, ARRAY_SIZE(denytable1)); + fnum1 = cli_open(&cli1, fname, denytable2[i].mode1, denytable2[i].deny1); -- cgit