summaryrefslogtreecommitdiff
path: root/source3/torture/denytest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-05 19:52:14 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-05 19:52:14 +0000
commit457112e9e4c7f138aaad98807d141f999c07463d (patch)
treea54bf3ef5d159a593607f1581504d2e42bba4871 /source3/torture/denytest.c
parent7f35a045fc8fc289830cf27180ca5b833cbb3c9b (diff)
downloadsamba-457112e9e4c7f138aaad98807d141f999c07463d.tar.gz
samba-457112e9e4c7f138aaad98807d141f999c07463d.tar.bz2
samba-457112e9e4c7f138aaad98807d141f999c07463d.zip
show a progress bar during the deny tests
(This used to be commit c2c8c4e713c362d0c6864c6359d90cf6b218e545)
Diffstat (limited to 'source3/torture/denytest.c')
-rw-r--r--source3/torture/denytest.c11
1 files changed, 11 insertions, 0 deletions
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);