summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/masktest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 0e0b531080..637e9ef63a 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -32,6 +32,7 @@ static char *maskchars = "<>\"?*abc.";
static char *filechars = "abcdefghijklm.";
static int verbose;
static int die_on_error;
+static int NumLoops = 0;
/* a test fn for LANMAN mask support */
int ms_fnmatch_lanman_core(char *pattern, char *string)
@@ -380,6 +381,8 @@ static void test_mask(int argc, char *argv[],
if (strspn(file+l, ".") == strlen(file+l)) continue;
testpair(cli, mask, file);
+ if (NumLoops && (--NumLoops == 0))
+ break;
}
finished:
@@ -394,6 +397,7 @@ static void usage(void)
masktest //server/share [options..]\n\
options:\n\
-d debuglevel\n\
+ -n numloops\n\
-W workgroup\n\
-U user%%pass\n\
-s seed\n\
@@ -455,8 +459,11 @@ static void usage(void)
seed = time(NULL);
- while ((opt = getopt(argc, argv, "d:U:s:hm:f:aoW:M:vE")) != EOF) {
+ while ((opt = getopt(argc, argv, "n:d:U:s:hm:f:aoW:M:vE")) != EOF) {
switch (opt) {
+ case 'n':
+ NumLoops = atoi(optarg);
+ break;
case 'd':
DEBUGLEVEL = atoi(optarg);
break;