From: Tim Kientzle Date: Sun, 21 Dec 2008 19:02:56 +0000 (-0500) Subject: Reduce the number of file patterns tested from 200 to 170. X-Git-Tag: v2.6.0~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a3c3ca8bd567dcf2fa1f324b247299d76404d4a;p=thirdparty%2Flibarchive.git Reduce the number of file patterns tested from 200 to 170. This seems to be necessary in order to run the tests on Cygwin. (?) Submitted by: Michihiro NAKAJIMA SVN-Revision: 278 --- diff --git a/tar/test/test_copy.c b/tar/test/test_copy.c index a64f2c886..349651c39 100644 --- a/tar/test/test_copy.c +++ b/tar/test/test_copy.c @@ -25,6 +25,8 @@ #include "test.h" __FBSDID("$FreeBSD: src/usr.bin/tar/test/test_copy.c,v 1.3 2008/08/15 06:12:02 kientzle Exp $"); +#define LOOP_MAX 170 + static void create_tree(void) { @@ -41,7 +43,7 @@ create_tree(void) assertEqualInt(0, mkdir("s", 0775)); assertEqualInt(0, mkdir("d", 0775)); - for (i = 0; i < 200; i++) { + for (i = 0; i < LOOP_MAX; i++) { buff[0] = 'f'; buff[1] = '/'; /* Create a file named "f/abcdef..." */ @@ -97,7 +99,7 @@ verify_tree(int limit) struct dirent *de; /* Generate the names we know should be there and verify them. */ - for (i = 1; i < 200; i++) { + for (i = 1; i < LOOP_MAX; i++) { /* Generate a base name of the correct length. */ for (j = 0; j < i; ++j) filename[j] = 'a' + (j % 26); @@ -219,7 +221,7 @@ verify_tree(int limit) } /* Our files have very particular filename patterns. */ if (p[0] != '.' || (p[1] != '.' && p[1] != '\0')) { - for (i = 0; p[i] != '\0' && i < 200; i++) { + for (i = 0; p[i] != '\0' && i < LOOP_MAX; i++) { failure("i=%d, p[i]='%c' 'a'+(i%%26)='%c'", i, p[i], 'a' + (i % 26)); assertEqualInt(p[i], 'a' + (i % 26)); }