grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.21-65-g4f898f2


From: Paul Eggert
Subject: grep branch, master, updated. v2.21-65-g4f898f2
Date: Sun, 20 Sep 2015 01:42:27 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  4f898f22f497d6296c864d17acf9b277761b4ab4 (commit)
       via  13e960b064163dfe7b776359d1a6c75574c160f9 (commit)
      from  8a33cdeba4ba032f3d0efebf230b86971c27e158 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=4f898f22f497d6296c864d17acf9b277761b4ab4


commit 4f898f22f497d6296c864d17acf9b277761b4ab4
Author: Paul Eggert <address@hidden>
Date:   Sat Sep 19 14:17:55 2015 -0700

    Add test for pop_fail_stack bug
    
    Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
    If you use --with-included-regex the bug fix is in gnulib, here:
    
http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=5513b40999149090987a0341c018d05d3eea1272
    If you use glibc, the bug fix has not been installed yet.
    * tests/Makefile.am (XFAIL_TESTS): Add backref-alt if system matcher.
    (TESTS): Add backref-alt.
    * tests/backref-alt: New file.
    * tests/triple-backref: Remove unused var.
    Don't skip if tested with glibc, as Makefile.am now handles this.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c95d5a9..d379821 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,16 +24,27 @@ AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
 LDADD = ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
 dfa_match_aux_LDADD = ../src/dfa.$(OBJEXT) $(LDADD)
 
+# The triple-backref test is expected to fail with both the system
+# matcher (i.e., with glibc) and with the included matcher.
+# Both matchers need to be fixed.
+# FIXME-2015: Remove this once the glibc and gnulib bugs are fixed.
 XFAIL_TESTS = triple-backref
 
 # Equivalence classes are only supported when using the system
 # matcher (which means only with glibc).
+# The included matcher needs to be fixed.
+# FIXME-2015: Remove this once the gnulib bug is fixed.
 if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
+else
+# The backslash-alt test fails for glibc, which needs to be fixed.
+# FIXME-2015: Remove this once the glibc bug is fixed.
+XFAIL_TESTS += backref-alt
 endif
 
 TESTS =                                                \
   backref                                      \
+  backref-alt                                  \
   backref-multibyte-slow                       \
   backref-word                                 \
   backslash-s-and-repetition-operators         \
diff --git a/tests/backref-alt b/tests/backref-alt
new file mode 100755
index 0000000..d6a8f2e
--- /dev/null
+++ b/tests/backref-alt
@@ -0,0 +1,27 @@
+#! /bin/sh
+# Test for a bug in glibc's regex code as of 2015-09-19.
+#
+# Copyright 2015 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+echo aa > in || framework_failure_
+
+fail=0
+
+grep -E 'b|(.)b|\1|b' in >out
+status=$?
+# POSIX isn’t clear whether this regular expression should be invalid,
+# (because the \1 is out of range for REs that could precede it)
+# or valid but \1 should not match.  Allow either interpretation.
+test $status -eq 2 || test $status -eq 1 || fail=1
+
+grep -E '0|()0|\1|0' in >out
+status=$?
+test $status -eq 2 || test $status -eq 1 || fail=1
+
+Exit $fail
diff --git a/tests/triple-backref b/tests/triple-backref
index d3cf5c3..035c576 100755
--- a/tests/triple-backref
+++ b/tests/triple-backref
@@ -9,23 +9,6 @@
 
 . "${srcdir=.}/init.sh"; path_prepend_ ../src
 
-failures=0
-
-# FIXME-2014: once the glibc bug is fixed, remove this skip-if-glibc guard.
-# Since this tests for an as-yet-unfixed bug in glibc,
-# we expect it to fail on such systems.
-# Since we expect this test to fail, we must skip this test on
-# non-glibc systems.
-cat <<\EOF > glibc.c
-#include <features.h>
-#if defined __GNU_LIBRARY__ && __GLIBC__ >= 2
-#else
-"run this test only with glibc"
-#endif
-EOF
-$CC -c glibc.c \
-  || skip_ 'this test runs only on systems with glibc'
-
 echo a > in || framework_failure_
 
 fail=0

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=13e960b064163dfe7b776359d1a6c75574c160f9


commit 4f898f22f497d6296c864d17acf9b277761b4ab4
Author: Paul Eggert <address@hidden>
Date:   Sat Sep 19 14:17:55 2015 -0700

    Add test for pop_fail_stack bug
    
    Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
    If you use --with-included-regex the bug fix is in gnulib, here:
    
http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=5513b40999149090987a0341c018d05d3eea1272
    If you use glibc, the bug fix has not been installed yet.
    * tests/Makefile.am (XFAIL_TESTS): Add backref-alt if system matcher.
    (TESTS): Add backref-alt.
    * tests/backref-alt: New file.
    * tests/triple-backref: Remove unused var.
    Don't skip if tested with glibc, as Makefile.am now handles this.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c95d5a9..d379821 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,16 +24,27 @@ AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
 LDADD = ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
 dfa_match_aux_LDADD = ../src/dfa.$(OBJEXT) $(LDADD)
 
+# The triple-backref test is expected to fail with both the system
+# matcher (i.e., with glibc) and with the included matcher.
+# Both matchers need to be fixed.
+# FIXME-2015: Remove this once the glibc and gnulib bugs are fixed.
 XFAIL_TESTS = triple-backref
 
 # Equivalence classes are only supported when using the system
 # matcher (which means only with glibc).
+# The included matcher needs to be fixed.
+# FIXME-2015: Remove this once the gnulib bug is fixed.
 if USE_INCLUDED_REGEX
 XFAIL_TESTS += equiv-classes
+else
+# The backslash-alt test fails for glibc, which needs to be fixed.
+# FIXME-2015: Remove this once the glibc bug is fixed.
+XFAIL_TESTS += backref-alt
 endif
 
 TESTS =                                                \
   backref                                      \
+  backref-alt                                  \
   backref-multibyte-slow                       \
   backref-word                                 \
   backslash-s-and-repetition-operators         \
diff --git a/tests/backref-alt b/tests/backref-alt
new file mode 100755
index 0000000..d6a8f2e
--- /dev/null
+++ b/tests/backref-alt
@@ -0,0 +1,27 @@
+#! /bin/sh
+# Test for a bug in glibc's regex code as of 2015-09-19.
+#
+# Copyright 2015 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+echo aa > in || framework_failure_
+
+fail=0
+
+grep -E 'b|(.)b|\1|b' in >out
+status=$?
+# POSIX isn’t clear whether this regular expression should be invalid,
+# (because the \1 is out of range for REs that could precede it)
+# or valid but \1 should not match.  Allow either interpretation.
+test $status -eq 2 || test $status -eq 1 || fail=1
+
+grep -E '0|()0|\1|0' in >out
+status=$?
+test $status -eq 2 || test $status -eq 1 || fail=1
+
+Exit $fail
diff --git a/tests/triple-backref b/tests/triple-backref
index d3cf5c3..035c576 100755
--- a/tests/triple-backref
+++ b/tests/triple-backref
@@ -9,23 +9,6 @@
 
 . "${srcdir=.}/init.sh"; path_prepend_ ../src
 
-failures=0
-
-# FIXME-2014: once the glibc bug is fixed, remove this skip-if-glibc guard.
-# Since this tests for an as-yet-unfixed bug in glibc,
-# we expect it to fail on such systems.
-# Since we expect this test to fail, we must skip this test on
-# non-glibc systems.
-cat <<\EOF > glibc.c
-#include <features.h>
-#if defined __GNU_LIBRARY__ && __GLIBC__ >= 2
-#else
-"run this test only with glibc"
-#endif
-EOF
-$CC -c glibc.c \
-  || skip_ 'this test runs only on systems with glibc'
-
 echo a > in || framework_failure_
 
 fail=0

-----------------------------------------------------------------------

Summary of changes:
 gnulib               |    2 +-
 tests/Makefile.am    |   11 +++++++++++
 tests/backref-alt    |   27 +++++++++++++++++++++++++++
 tests/triple-backref |   17 -----------------
 4 files changed, 39 insertions(+), 18 deletions(-)
 create mode 100755 tests/backref-alt


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]