9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Alex Musolino <alex@musolino.id.au>
To: 9fans@9fans.net
Subject: Re: [9fans] Error when trying to install contrib/install
Date: Fri, 24 Feb 2023 23:03:33 +1030	[thread overview]
Message-ID: <CFD6C3F61FB137401115D7C802F7F92F@musolino.id.au> (raw)
In-Reply-To: <C8A4F4B4-B93E-4020-A9E5-AF83728B163A@9srv.net>

> 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:


> 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.

Alex Musolino

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

  reply	other threads:[~2023-02-24 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  8:00 quiekaizam via 9fans
2023-02-24  7:45 ` Anthony Sorace
2023-02-24 12:33   ` Alex Musolino [this message]
2023-02-24 13:43     ` ori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CFD6C3F61FB137401115D7C802F7F92F@musolino.id.au \
    --to=alex@musolino.id.au \
    --cc=9fans@9fans.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).