From bcbcf6efab05cf2acaea952cb6ba91763bfab541 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 8 Jan 2005 00:46:04 +0000 Subject: [PATCH] Update tests so that grep+glibc dont get stuck in an infinite loop #76879 by Patrick Lauer. --- sys-apps/grep/ChangeLog | 6 ++++- sys-apps/grep/files/2.5.1-tests.patch | 38 ++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/sys-apps/grep/ChangeLog b/sys-apps/grep/ChangeLog index 31e953167807..56a07571d6c7 100644 --- a/sys-apps/grep/ChangeLog +++ b/sys-apps/grep/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/grep # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.40 2005/01/06 05:36:21 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.41 2005/01/08 00:46:04 vapier Exp $ + + 07 Jan 2005; Mike Frysinger files/2.5.1-tests.patch: + Update tests so that grep+glibc dont get stuck in an infinite loop #76879 by + Patrick Lauer. *grep-2.5.1-r7 (06 Jan 2005) diff --git a/sys-apps/grep/files/2.5.1-tests.patch b/sys-apps/grep/files/2.5.1-tests.patch index c0f98945eaaa..5d29d5924297 100644 --- a/sys-apps/grep/files/2.5.1-tests.patch +++ b/sys-apps/grep/files/2.5.1-tests.patch @@ -6,8 +6,40 @@ the glibc regex since that is what we're using ;). http://bugs.gentoo.org/show_bug.cgi?id=76192 http://linuxfromscratch.org/pipermail/lfs-dev/2003-February/032543.html ---- tests/spencer1.tests.orig 2005-01-06 00:17:34.550645568 -0500 -+++ tests/spencer1.tests 2005-01-06 00:18:43.682135984 -0500 -@@ -55 +55 @@ + +glibc has a sweet bug where it can go to town (and never come back) +with some complicated regex's. this has been fixed in glibc cvs, +but our latest releases don't have the patch. so let's add a simple +workaround from upstream grep cvs. + +http://bugs.gentoo.org/show_bug.cgi?id=76879 + +Index: tests/spencer1.tests +=================================================================== +RCS file: /cvsroot/grep/grep/tests/spencer1.tests,v +retrieving revision 1.1 +retrieving revision 1.2 +diff -u -r1.1 -r1.2 +--- tests/spencer1.tests 3 Nov 1998 21:39:05 -0000 1.1 ++++ tests/spencer1.tests 12 Jun 2003 15:26:15 -0000 1.2 +@@ -52,3 +52,3 @@ + 0@$*@- -1@(*)b@- +2@(*)b@- + 1@$b@b +Index: tests/backref.sh +=================================================================== +RCS file: /cvsroot/grep/grep/tests/backref.sh,v +retrieving revision 1.3 +retrieving revision 1.4 +diff -u -r1.3 -r1.4 +--- tests/backref.sh 23 Jul 2003 05:15:51 -0000 1.3 ++++ tests/backref.sh 19 Nov 2004 14:00:18 -0000 1.4 +@@ -14,5 +14,6 @@ + + # hit hard with the `Bond' tests +-echo "civic" | ${GREP} -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' > /dev/null 2>&1 ++# For now, remove the ``?'' in the last parentheses, so that new glibc can do it. --Stepan ++echo "civic" | ${GREP} -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\9\8\7\6\5\4\3\2\1$' > /dev/null 2>&1 + if test $? -ne 0 ; then + echo "Options: Bond, test \#2 failed" -- 2.26.2