aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2009-03-08 05:14:16 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2009-03-08 05:14:16 +0000
commit5ff33ec7ae01ce4aa26462601581fc925996f966 (patch)
treecc532abb4bb99f9d9bef7846de00034c1952dd60 /usr.bin/tar
parent7bae205d49cd1ccaa0a10aa3a3f2c9252d1626f6 (diff)
downloadsrc-5ff33ec7ae01ce4aa26462601581fc925996f966.tar.gz
src-5ff33ec7ae01ce4aa26462601581fc925996f966.zip
Merge r278 from libarchive.googlecode.com: Reduce the number of
patterns tested here from 200 to 170, which seems to be the most that Cygwin can handle.
Notes
Notes: svn path=/head/; revision=189511
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/test/test_copy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/tar/test/test_copy.c b/usr.bin/tar/test/test_copy.c
index 6618a0e53f07..7f12f9c89bb2 100644
--- a/usr.bin/tar/test/test_copy.c
+++ b/usr.bin/tar/test/test_copy.c
@@ -25,6 +25,8 @@
#include "test.h"
__FBSDID("$FreeBSD$");
+#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));
}