bug-grep
[Top][All Lists]
Advanced

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

[PATCH] tests: don't ignore sjis-mb test failure


From: Jim Meyering
Subject: [PATCH] tests: don't ignore sjis-mb test failure
Date: Wed, 08 Jun 2011 11:36:14 +0200

FYI,

>From 9d60e79a26787b742a1f075ac96195b111f68af0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 8 Jun 2011 11:34:04 +0200
Subject: [PATCH] tests: don't ignore sjis-mb test failure

I made changes that caused grep to segfault during "make check" --
as seen in dmesg output -- yet no test failed(!), and there was no
trace of the segfault in the logs.
* tests/sjis-mb (test_grep_reject): Ensure that output is empty.
Don't ignore test failure.
---
 tests/sjis-mb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/sjis-mb b/tests/sjis-mb
index 0ccbc8d..07c9a9a 100644
--- a/tests/sjis-mb
+++ b/tests/sjis-mb
@@ -28,7 +28,7 @@ test_grep_reject() {
   encode "$2" | \
     LC_ALL=$locale \
       timeout 10s grep $1 $(encode "$3") > out$k 2>&1
-  test $? = 1
+  test $? = 1 && compare out$k /dev/null
 }

 test_grep() {
@@ -50,8 +50,8 @@ for i in $successful_tests; do
   test_grep -E $i A || fail=1
 done

-test_grep_reject -F @@ @
-test_grep_reject -E @@ @
+test_grep_reject -F @@ @ || fail=1
+test_grep_reject -E @@ @ || fail=1
 for i in $failure_tests; do
   test_grep_reject -F $i A || fail=1
   test_grep_reject -E $i A || fail=1
--
1.7.6.rc0.293.g40857



reply via email to

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