On 06/03/2014 01:12 PM, Eric Blake wrote: > On 06/03/2014 05:28 AM, Bernhard Voelker wrote: > >> yes, sure, but ... wait, a test was failing; the following >> fixes it: >> >> diff --git a/gnulib b/gnulib >> index a10acfb..2f40bc5 160000 >> --- a/gnulib >> +++ b/gnulib >> @@ -1 +1 @@ >> -Subproject commit a10acfb1d2118f9a180181d3fed5399dbbe1df3c >> +Subproject commit 2f40bc523412742dac387b37d70b5a7f5d8363cc >> diff --git a/tests/misc/help-version.sh b/tests/misc/help-version.sh >> index 4bc02d8..50c05a2 100755 >> --- a/tests/misc/help-version.sh >> +++ b/tests/misc/help-version.sh >> @@ -92,6 +92,13 @@ for lang in C fr da; do >> >> # Make sure they fail upon 'disk full' error. >> if test -w /dev/full && test -c /dev/full; then >> + # true succeeds with --help or --version even if write fails. >> + if test $i = true; then >> + env $i --help >/dev/full || fail=1 >> + env $i --version >/dev/full || fail=1 >> + continue >> + fi >> + > > Oh, good point. Maybe it's better to consistently have --help/--version > return status 0 (we successfully printed output) or 1 (we encountered > write failure) regardless of the program being executed (which means > true is doing it right, and 'false --version' is the odd man out, > opposite to what the most recent patch proposal does). I'd wait for > Paul and/or Jim to weigh in on this, since they made the decisions > behind the current unpatched behavior.
My slight preference is to change true to be consistent, as then it's consistent on all implementations, not just within coreutils. I.E. the following would now hold everywhere: true --help > /dev/full && echo always ok Pádraig.