One of GNU time's test surprisingly failed on Solaris. Here is the
program invocation that fails:
returns_ 1 env time -o out-def1 false || fail=1
Here is some output on Solaris 10 (cfarm210):
$ echo $SHELL
/bin/sh
$ type false
false is /usr/bin/false
$ false; echo $?
255
$ gfalse; echo $?
1
I guess this was a bug in GNU time's test suite since POSIX used to only
require the exit status be non-zero. POSIX.1-2024 added the requirement
that it be some value between 1 to 125, inclusive [1]. It looks like the
illumos people fixed this at least [2].
I don't think gnulib makes the improper assumption that 'false' returns
1 anywhere, just mentioning it on this list in case it comes up in the
future. Also, because I wasted a few minutes thinking WEXITSTATUS was
buggy before I ran 'gfalse'.
Collin
[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/false.html
[2]
https://github.com/illumos/illumos-gate/commit/2833423dc59f4c35fe4713dbb942950c82df0437