grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.17-6-gd5bfcc2


From: Jim Meyering
Subject: grep branch, master, updated. v2.17-6-gd5bfcc2
Date: Fri, 21 Feb 2014 04:40:44 +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  d5bfcc2daa123fa0e8660909052f7ca2ec6b7649 (commit)
       via  c7c8bcdefe7be5f59a242eea63df7f64eacb6a09 (commit)
       via  11ce80861109361570cbedda6a966264367f7c76 (commit)
      from  1179952ef0728c6f8cb65214fc8be2732c2d27a3 (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=d5bfcc2daa123fa0e8660909052f7ca2ec6b7649


commit d5bfcc2daa123fa0e8660909052f7ca2ec6b7649
Author: Jim Meyering <address@hidden>
Date:   Thu Feb 20 16:06:13 2014 -0800

    tests: test for the non-UTF8 multi-byte performance regression
    
    Test for the just-fixed performance regression.
    With a 100-200x differential, it is reasonable to expect that
    a very slow system will be able to complete the designated
    task in a few seconds, while with the bug, even a very fast
    system would exceed the timeout.
    * tests/mb-non-UTF8-performance: New file.
    * tests/Makefile.am (TESTS): Add it.
    * tests/init.cfg (require_JP_EUC_locale_): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 331467a..4ffea85 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -72,6 +72,7 @@ TESTS =                                               \
   khadafy                                      \
   long-line-vs-2GiB-read                       \
   max-count-vs-context                         \
+  mb-non-UTF8-performance                      \
   multibyte-white-space                                \
   empty-line-mb                                        \
   unibyte-bracket-expr                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index ee5d537..5555e2d 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -103,6 +103,22 @@ require_unibyte_locale()
   skip_ 'no unibyte locale found'
 }
 
+require_JP_EUC_locale_()
+{
+  local locale=ja_JP.eucJP
+  path_prepend_ .
+  case $(get-mb-cur-max $locale) in
+    [23])
+        LC_ALL=$locale &&
+        export LC_ALL &&
+        return
+        ;;
+    *) ;;
+  esac
+
+  skip_ "$loc locale not found"
+}
+
 expensive_()
 {
   if test "$RUN_EXPENSIVE_TESTS" != yes; then
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
new file mode 100755
index 0000000..282f0c4
--- /dev/null
+++ b/tests/mb-non-UTF8-performance
@@ -0,0 +1,32 @@
+#!/bin/sh
+# grep-2.17 would take nearly 200x longer to run the command below.
+
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_timeout_
+
+fail=0
+
+require_JP_EUC_locale_
+
+yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
+
+# Expect no match, i.e., exit status of 1.  Anything else is an error.
+timeout 4 grep -i foobar in; st=$?
+test $st = 1 || fail=1
+
+Exit $fail

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


commit d5bfcc2daa123fa0e8660909052f7ca2ec6b7649
Author: Jim Meyering <address@hidden>
Date:   Thu Feb 20 16:06:13 2014 -0800

    tests: test for the non-UTF8 multi-byte performance regression
    
    Test for the just-fixed performance regression.
    With a 100-200x differential, it is reasonable to expect that
    a very slow system will be able to complete the designated
    task in a few seconds, while with the bug, even a very fast
    system would exceed the timeout.
    * tests/mb-non-UTF8-performance: New file.
    * tests/Makefile.am (TESTS): Add it.
    * tests/init.cfg (require_JP_EUC_locale_): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 331467a..4ffea85 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -72,6 +72,7 @@ TESTS =                                               \
   khadafy                                      \
   long-line-vs-2GiB-read                       \
   max-count-vs-context                         \
+  mb-non-UTF8-performance                      \
   multibyte-white-space                                \
   empty-line-mb                                        \
   unibyte-bracket-expr                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index ee5d537..5555e2d 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -103,6 +103,22 @@ require_unibyte_locale()
   skip_ 'no unibyte locale found'
 }
 
+require_JP_EUC_locale_()
+{
+  local locale=ja_JP.eucJP
+  path_prepend_ .
+  case $(get-mb-cur-max $locale) in
+    [23])
+        LC_ALL=$locale &&
+        export LC_ALL &&
+        return
+        ;;
+    *) ;;
+  esac
+
+  skip_ "$loc locale not found"
+}
+
 expensive_()
 {
   if test "$RUN_EXPENSIVE_TESTS" != yes; then
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
new file mode 100755
index 0000000..282f0c4
--- /dev/null
+++ b/tests/mb-non-UTF8-performance
@@ -0,0 +1,32 @@
+#!/bin/sh
+# grep-2.17 would take nearly 200x longer to run the command below.
+
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_timeout_
+
+fail=0
+
+require_JP_EUC_locale_
+
+yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
+
+# Expect no match, i.e., exit status of 1.  Anything else is an error.
+timeout 4 grep -i foobar in; st=$?
+test $st = 1 || fail=1
+
+Exit $fail

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=11ce80861109361570cbedda6a966264367f7c76


commit d5bfcc2daa123fa0e8660909052f7ca2ec6b7649
Author: Jim Meyering <address@hidden>
Date:   Thu Feb 20 16:06:13 2014 -0800

    tests: test for the non-UTF8 multi-byte performance regression
    
    Test for the just-fixed performance regression.
    With a 100-200x differential, it is reasonable to expect that
    a very slow system will be able to complete the designated
    task in a few seconds, while with the bug, even a very fast
    system would exceed the timeout.
    * tests/mb-non-UTF8-performance: New file.
    * tests/Makefile.am (TESTS): Add it.
    * tests/init.cfg (require_JP_EUC_locale_): New function.

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 331467a..4ffea85 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -72,6 +72,7 @@ TESTS =                                               \
   khadafy                                      \
   long-line-vs-2GiB-read                       \
   max-count-vs-context                         \
+  mb-non-UTF8-performance                      \
   multibyte-white-space                                \
   empty-line-mb                                        \
   unibyte-bracket-expr                         \
diff --git a/tests/init.cfg b/tests/init.cfg
index ee5d537..5555e2d 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -103,6 +103,22 @@ require_unibyte_locale()
   skip_ 'no unibyte locale found'
 }
 
+require_JP_EUC_locale_()
+{
+  local locale=ja_JP.eucJP
+  path_prepend_ .
+  case $(get-mb-cur-max $locale) in
+    [23])
+        LC_ALL=$locale &&
+        export LC_ALL &&
+        return
+        ;;
+    *) ;;
+  esac
+
+  skip_ "$loc locale not found"
+}
+
 expensive_()
 {
   if test "$RUN_EXPENSIVE_TESTS" != yes; then
diff --git a/tests/mb-non-UTF8-performance b/tests/mb-non-UTF8-performance
new file mode 100755
index 0000000..282f0c4
--- /dev/null
+++ b/tests/mb-non-UTF8-performance
@@ -0,0 +1,32 @@
+#!/bin/sh
+# grep-2.17 would take nearly 200x longer to run the command below.
+
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+require_timeout_
+
+fail=0
+
+require_JP_EUC_locale_
+
+yes $(printf '%078d' 0) | head -50000 > in || framework_failure_
+
+# Expect no match, i.e., exit status of 1.  Anything else is an error.
+timeout 4 grep -i foobar in; st=$?
+test $st = 1 || fail=1
+
+Exit $fail

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

Summary of changes:
 NEWS                                               |    3 +++
 src/dfa.c                                          |    2 +-
 src/dfa.h                                          |    2 ++
 src/main.c                                         |    6 ++++++
 src/searchutils.c                                  |    9 ++-------
 tests/Makefile.am                                  |    1 +
 tests/init.cfg                                     |   16 ++++++++++++++++
 ...-negated-circumflex => mb-non-UTF8-performance} |   15 ++++++++++-----
 8 files changed, 41 insertions(+), 13 deletions(-)
 copy tests/{unibyte-negated-circumflex => mb-non-UTF8-performance} (71%)


hooks/post-receive
-- 
grep



reply via email to

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