diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 08:12:34 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 08:12:34 +0000 |
commit | 2206df6b30c4992daa17257287390421cfc0662d (patch) | |
tree | e22b30e4aa5e028b6b1c7c5d5e7e53b77e3d25e3 /source3/torture/masktest.c | |
parent | a7d2c332fca9c85c21ff6dba424559c9323feacf (diff) | |
download | samba-2206df6b30c4992daa17257287390421cfc0662d.tar.gz samba-2206df6b30c4992daa17257287390421cfc0662d.tar.bz2 samba-2206df6b30c4992daa17257287390421cfc0662d.zip |
Merge torture tests from HEAD - it looks like we had rather an incomplete
merge last time. I hope this might fix a few failures on the build farm too.
Andrew Bartlett
(This used to be commit 0c837126923cc30fa60223a5a68d4f527971cc7b)
Diffstat (limited to 'source3/torture/masktest.c')
-rw-r--r-- | source3/torture/masktest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index 7d751fb789..06dead3f16 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -33,6 +33,7 @@ static const char *filechars = "abcdefghijklm."; static int verbose; static int die_on_error; static int NumLoops = 0; +static int ignore_dot_errors = 0; /* a test fn for LANMAN mask support */ int ms_fnmatch_lanman_core(const char *pattern, const char *string) @@ -324,7 +325,9 @@ static void testpair(struct cli_state *cli, char *mask, char *file) res2 = reg_test(cli, mask, long_name, short_name); - if (showall || strcmp(res1, res2)) { + if (showall || + ((strcmp(res1, res2) && !ignore_dot_errors) || + (strcmp(res1+2, res2+2) && ignore_dot_errors))) { DEBUG(0,("%s %s %d mask=[%s] file=[%s] rfile=[%s/%s]\n", res1, res2, count, mask, file, long_name, short_name)); if (die_on_error) exit(1); @@ -409,6 +412,7 @@ static void usage(void) -v verbose mode\n\ -E die on error\n\ -a show all tests\n\ + -i ignore . and .. errors\n\ \n\ This program tests wildcard matching between two servers. It generates\n\ random pairs of filenames/masks and tests that they match in the same\n\ @@ -461,7 +465,7 @@ static void usage(void) seed = time(NULL); - while ((opt = getopt(argc, argv, "n:d:U:s:hm:f:aoW:M:vE")) != EOF) { + while ((opt = getopt(argc, argv, "n:d:U:s:hm:f:aoW:M:vEi")) != EOF) { switch (opt) { case 'n': NumLoops = atoi(optarg); @@ -472,6 +476,9 @@ static void usage(void) case 'E': die_on_error = 1; break; + case 'i': + ignore_dot_errors = 1; + break; case 'v': verbose++; break; |