In patch 2.7.3, tests/read-only-files fails with a POSIX-conformant
shell.  The problematic section is this:

  : > read-only
  chmod a-w read-only
  if : 2> /dev/null > read-only; then
      echo "Files with read-only permissions are writable" \
           "(probably running as superuser)" >&2
      exit 77
  fi
  rm -f read-only

A redirection failure for a special built-in causes the shell to
exit, and the colon command is a special built-in.

In practice, the test errors out unexpectedly with FreeBSD sh,
OpenBSD sh (pdksh), and bash --posix.

Suggested fix: Perform the redirection in a subshell.

- if : 2> /dev/null > read-only; then
+ if ( : 2> /dev/null > read-only ); then

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to