cvs commit: src/bin/test test.1

Yar Tikhiy yar at comp.chem.msu.su
Fri Jul 28 13:43:17 UTC 2006


On Fri, Jul 28, 2006 at 02:56:13PM +0200, Dag-Erling Sm?rgrav wrote:
> Yar Tikhiy <yar at FreeBSD.org> writes:
> >   Log:
> >   Document that both sides of -a or -o are always evaluated.  This
> >   "feature" doesn't seem to be in the standards or elsewhere, and
> >   it is against what we are used to in C and sh(1), so put the
> >   paragraph under BUGS.
> 
> I don't understand what the issue is.  None of test's operators have
> side effects, so shortcut evaluation makes no difference.

I'm afraid this isn't quite true.  The difference is in a) performance
(can be considerable over NFS,) and b) audit records if file system
audit is enabled.  I also can imagine a pseudo file system that
takes certain actions on stat(2).  Not to mention auto-mounting on
demand, which is a special case of the latter.  IMHO this can justify
the humble paragraph in the manpage.

Any more objections?

-- 
Yar


More information about the cvs-all mailing list