On 03/24/2010 02:40 AM, Jim Meyering wrote:
> No big deal, but I saw recent additions of "test ... -a ..."
> (not portable) so fixed the rest, too.
> 
> Now, searching for violations shows none:
> 
>   git grep '\<test .* -a '

Better would be git grep '\<test .* -[ao] '

> 
> Whether it's possible to rely on test -a in test scripts is debatable:
> perhaps you've ensured that the SHELL you use when running tests is
> POSIX compliant or better (I do that in coreutils),

But test -a is optional - POSIX says it is only required by XSI
extensions, and some shells (think posh) go so far as to explicitly
reject all optional POSIX constructs.  (Not that I know anyone crazy
enough to choose posh instead of dash as their /bin/sh, but still...)

> Since this is a global change, it deserves a syntax-check rule.

All right - that means it should be easy to submit a followup series to
kill test -o.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to