* tests/zgrep-signal: Don't assume exit status 141 on PIPE signal.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 3 Nov 2011 00:26:18 +0000 (17:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 3 Nov 2011 00:26:38 +0000 (17:26 -0700)
Problem reported by Eric Blake in
<http://lists.gnu.org/archive/html/bug-gzip/2011-11/msg00007.html>.

tests/zgrep-signal

index e19293a824cf715330037a9e9668e8759069c065..32608755cc2382786b5fa4d7f7b97264cecacbca 100644 (file)
@@ -43,13 +43,14 @@ write_to_dangling_pipe () {
   ) | : || framework_failure_
 }
 
-st=$(write_to_dangling_pipe cat f.gz f.gz)
-test "$st" = 141 || framework_failure_ 'signal handling busted on this host'
+signal_status=$(write_to_dangling_pipe cat f.gz f.gz)
+test 128 -lt $signal_status ||
+  framework_failure_ 'signal handling busted on this host'
 
 fail=0
 
 st=$(write_to_dangling_pipe zgrep a f.gz f.gz)
 
-test "$st" = 141 || fail=1
+test $st = $signal_status || fail=1
 
 Exit $fail