bug-grep
[Top][All Lists]
Advanced

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

grep-2.10 on OSF/1


From: Bruno Haible
Subject: grep-2.10 on OSF/1
Date: Sun, 20 Nov 2011 14:11:51 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Hi Jim,

Compared to the prerelease, grep 2.10 has some improvements and some
regression.

"make" works equally well, unchanged.

1) Originally, "make check" failed gave an error "sh: VERSION=2.9.69-f91c:
is not an identifier", whereas "gmake check" didn't.
(My assessment that the SHELL variable needed to be changed [1] was apparently
wrong.)
In 2.10, the situation is the same.

Whereas the patch I had proposed in [2] made "make check" pass.
The next patch [3] was OK as well. The commit
af8be8854b7719aea3c194a2dfbfce6c37d646f6, however, broke it. Here is a fix:


2011-11-20  Bruno Haible  <address@hidden>

        Fix "make check" error on OSF/1.
        * tests/Makefile.am (TESTS_ENVIRONMENT): Test the value of the variable
        BASH_VERSION, not the literal ASH_VERSION.

--- tests/Makefile.am.bak       2011-11-12 17:49:36.000000000 +0100
+++ tests/Makefile.am   2011-11-20 13:46:13.000000000 +0100
@@ -106,7 +106,7 @@
   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;        \
   TMPDIR=$$tmp__; export TMPDIR;               \
                                                \
-  if test -n "$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
+  if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
     export_with_values () { export "$$@"; };           \
   else                                                 \
     export_with_values ()                              \



2) The gnulib tests test-exclude2.sh and test-exclude5.sh (that were failing)
are now skipped.


3) But there are new test failures:

FAIL: ignore-mmap
FAIL: max-count-vs-context

Trace of execution of "gmake check TESTS=ignore-mmap VERBOSE=yes":
...
+ echo a
+ fail=0
+ grep --mmap a in
+ compare out in
+ diff -c out in
+ grep --mmap b in
+ test 1 = 1
+ compare out /dev/null
+ diff -c out /dev/null
diff: Cannot compare character special file.
+ fail=1
+ Exit 1
...

Should we change init.sh to avoid "diff -c" (and fall back to 'cmp')
if it cannot cope with /dev/null? Or change the test to use a regular
file instead of /dev/null?

My vote is to use "diff -c" whenever it is available, because when you
receive an execution log that says that 'cmp' has failed at byte 231,
it does not really tell you much. Here's a proposed patch.


2011-11-20  Bruno Haible  <address@hidden>

        Fix test failures on OSF/1 5.1.
        * tests/ignore-mmap: Pass a regular file, not /dev/null, to 'compare'.
        * tests/max-count-vs-context: Likewise.

--- tests/ignore-mmap.bak       2011-09-10 09:17:04.000000000 +0200
+++ tests/ignore-mmap   2011-11-20 14:06:25.000000000 +0100
@@ -11,6 +11,7 @@
 grep --mmap b in > out 2>&1
 # Expect no match and no output.
 test $? = 1 || fail=1
-compare out /dev/null || fail=1
+: > expected
+compare out expected || fail=1
 
 Exit $fail
--- tests/max-count-vs-context.bak      2010-11-03 16:47:23.000000000 +0100
+++ tests/max-count-vs-context  2011-11-20 14:08:59.000000000 +0100
@@ -13,11 +13,12 @@
 EOF
 
 sed 4q in > exp || framework_failure_
+: > errexp || framework_failure_
 
 fail=0
 grep -m1 -A5 needle in > out 2>err || fail=1
 
 compare out exp || fail=1
-compare err /dev/null || fail=1
+compare err errexp || fail=1
 
 Exit $fail


[1] https://lists.gnu.org/archive/html/bug-grep/2011-11/msg00035.html
[2] https://lists.gnu.org/archive/html/bug-grep/2011-11/msg00036.html
[3] https://lists.gnu.org/archive/html/bug-grep/2011-11/msg00040.html
-- 
In memoriam Kerem Yılmazer <http://en.wikipedia.org/wiki/Kerem_Yılmazer>



reply via email to

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