grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v3.0-26-g9fbc2fb


From: Jim Meyering
Subject: grep branch, master, updated. v3.0-26-g9fbc2fb
Date: Sat, 1 Jul 2017 12:31:04 -0400 (EDT)

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  9fbc2fb1823c71a9d3370e0b04886c5994000fa8 (commit)
      from  bdce7a23e55e82efa429e001dd6f2979d7f5d351 (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=9fbc2fb1823c71a9d3370e0b04886c5994000fa8


commit 9fbc2fb1823c71a9d3370e0b04886c5994000fa8
Author: Jim Meyering <address@hidden>
Date:   Thu Jun 29 18:06:11 2017 -0700

    tests: avoid false failures when run in qemu user mode
    
    * tests/filename-lineno.pl: Derive the program name that grep
    will use in diagnostics, based on a suggestion from Assaf Gordon.
    * tests/in-eq-out-infloop: Similar: accept an arbitrary "command_name: "
    prefix on checked diagnostics, rather than requiring "grep: ".
    * tests/reversed-range-endpoints: Likewise.
    * tests/write-error-msg: Likewise.
    Reported by Bruno Haible in http://bugs.gnu.org/27532

diff --git a/tests/filename-lineno.pl b/tests/filename-lineno.pl
index 8eead57..6cc86b7 100755
--- a/tests/filename-lineno.pl
+++ b/tests/filename-lineno.pl
@@ -24,6 +24,9 @@ use strict;
 (my $program_name = $0) =~ s|.*/||;
 
 my $prog = 'grep';
+my $full_prog_name = `$prog --no-such-option 2>&1`;
+$full_prog_name =~ s/:.*//s;
+$prog = $full_prog_name if $full_prog_name;
 
 # Turn off localization of executable's output.
 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
diff --git a/tests/in-eq-out-infloop b/tests/in-eq-out-infloop
index 1742825..c6d5968 100755
--- a/tests/in-eq-out-infloop
+++ b/tests/in-eq-out-infloop
@@ -24,6 +24,8 @@ for arg in out - ''; do
   # grep-2.10 and earlier would infloop with $arg = - or $arg = ''.
   timeout 10 grep 0 $arg < out >> out 2> err; st=$?; test $st = 2 || fail=1
   sed 's/file .* is/file ... is/' err > k && mv k err
+  # Normalize the diagnostic prefix from e.g., "/mnt/dir/grep: " to "grep: "
+  sed 's/^[^:]*: /grep: /' err > k && mv k err
   compare err.exp err || fail=1
 
   # But with each of the following options it must not exit-2.
diff --git a/tests/reversed-range-endpoints b/tests/reversed-range-endpoints
index 0737447..4c2193c 100755
--- a/tests/reversed-range-endpoints
+++ b/tests/reversed-range-endpoints
@@ -4,13 +4,13 @@
 
 fail=0
 
-printf 'Invalid range end\n' > exp
+printf 'grep: Invalid range end\n' > exp
 for prog in grep 'grep -E'; do
   # exit status must be 2, not 1
   returns_ 2 $prog '[b-a]' < /dev/null > out 2>&1 || fail=1
 
-  # Remove "$prog: " prefix from actual output.
-  sed 's/^[grep]*: //' out > k && mv k out
+  # Normalize the diagnostic prefix from e.g., "/mnt/dir/grep: " to "grep: "
+  sed 's/^[^:]*: /grep: /' out > k && mv k out
 
   compare exp out || fail=1
 done
diff --git a/tests/write-error-msg b/tests/write-error-msg
index f2ab6da..e79c45b 100755
--- a/tests/write-error-msg
+++ b/tests/write-error-msg
@@ -40,7 +40,7 @@ returns_ 2 grep -v '^$' <in >/dev/full 2>err2 \
 # ensure each error message file contains a 'write error' with additional text
 for f in err1 err2 ;
 do
-    grep -Eiq '^grep: write error: [a-z]+' $f \
+    grep -Eiq '^[^:]*: write error: [a-z]+' $f \
         || {
              warn_ "incorrect/missing error message in file $f"
              compare /dev/null $f   # print the content in the logs

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

Summary of changes:
 tests/filename-lineno.pl       | 3 +++
 tests/in-eq-out-infloop        | 2 ++
 tests/reversed-range-endpoints | 6 +++---
 tests/write-error-msg          | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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