changeset 12364:ed32b5a7bd26

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.
author Jim Meyering <meyering@redhat.com>
date Thu, 26 Nov 2009 08:51:11 +0100
parents 6fe970af0447
children 6b87c7575253
files ChangeLog tests/test-pread.sh
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
--- a/tests/test-pread.sh
+++ b/tests/test-pread.sh
@@ -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