# HG changeset patch # User Jim Meyering # Date 1259221871 -3600 # Node ID ed32b5a7bd260102ec7ba5ae8a46a7079199873b # Parent 6fe970af0447a030c8f3a0131f59bdb90790d92c 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-26 Jim Meyering + + 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 test-pread: cover failure with ESPIPE and EINVAL diff --git a/tests/test-pread.sh b/tests/test-pread.sh --- 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