> I believe so, yes.  It looks like 9front has made some significant
> changes to (or removed?  I didn’t dig in) test’s handling of
> “implied” -a and -o operands.

Test(1) was changed for 9front because the old test(1) was broken.  It
does not have any sort of "implied" -a or -o operands.  Actually, it
silently ignores what comes after the first expression if there is no
-o or -a to combine it with other expressions.

The specific example from fgb's contrib/install script is doubly wrong
since there's no argument supplied to the -w option.  I guess because
old test(1) doesn't complain, people may have assumed that this syntax
was a cute way to check that a directory exists *and* that it is
writable.  Ratrace(1), however, will show you that the old test(1)
only does one stat(5) syscall in this case and, in fact, calls
exits(0) regardless of whether the directory is writable or not.

The new test(1) in 9front passes the following test suite, which is
mostly stolen from something the OpenBSD folks had used to test their
own test(1) program:

http://git.9front.org/plan9front/regress/717df14acac498bfb4496066a60c1ae83e93d9b7/cmd/test.rc/f.html

> I would suggest compiling the plan9 version locally and seeing if
> that fixes the issue.

That will probably get you by, but I'd say the contrib/install script
should be fixed also.

--
Cheers,
Alex Musolino


------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T23b7964cf6e8776e-Mdbb0237c5d0d5fa0441d5e2e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to