test-pread.sh: avoid diagnostics for those who ignore SIGPIPE
authorJim Meyering <meyering@redhat.com>
Thu, 26 Nov 2009 07:51:11 +0000 (08:51 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 26 Nov 2009 07:51:11 +0000 (08:51 +0100)
* tests/test-pread.sh: Write no data into the pipe, because
test-pread actually reads none.  This avoids a diagnostic,
"bash: echo: write error: Broken pipe", that arises in the unusual
event something is ignoring SIGPIPE, and might be interpreted
as some sort of failure.  Reported by Bruno Haible.

ChangeLog
tests/test-pread.sh

index 2ec9906c436dab316c96a541f07e95c39c8fe131..bcb43400b751724288123ab2435ec57772afb1a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-26  Jim Meyering  <meyering@redhat.com>
+
+       test-pread.sh: avoid diagnostics for those who ignore SIGPIPE
+       * tests/test-pread.sh: Write no data into the pipe, because
+       test-pread actually reads none.  This avoids a diagnostic,
+       "bash: echo: write error: Broken pipe", that arises in the unusual
+       event something is ignoring SIGPIPE, and might be interpreted
+       as some sort of failure.  Reported by Bruno Haible.
+
 2009-11-25  Jim Meyering  <meyering@redhat.com>
 
        test-pread: cover failure with ESPIPE and EINVAL
index 5ab88eb6ffe343529ded45acddd6b203896e88a1..d7824ad1b101bab7cef52f8dd74204418e31efa8 100755 (executable)
@@ -2,7 +2,7 @@
 : ${srcdir=.}
 . $srcdir/init.sh --set-path=.
 
-fail=0;
-echo abc | test-pread || fail=1
+fail=0
+: | test-pread || fail=1
 
 Exit $fail