public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Zack Weinberg <zackw@panix.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH v3 1/3] tst: Extend cross-test-ssh.sh to specify if target date can be altered
Date: Tue, 16 Feb 2021 20:53:07 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2102162042330.3135710@digraph.polyomino.org.uk> (raw)
In-Reply-To: <CAKCAbMinpRi1VDRmnpjkgCe+h81ciFcE_koJn7jdhBqetWCMrg@mail.gmail.com>

On Tue, 16 Feb 2021, Zack Weinberg wrote:

> On Tue, Feb 16, 2021 at 3:33 PM Joseph Myers <joseph@codesourcery.com>
> wrote:
> 
> > On Tue, 16 Feb 2021, DJ Delorie via Libc-alpha wrote:
> > > The paranoia accounts for $settimeallowed expanding to something
> > > starting with "-" and being treated as an option to test.
> >
> > But "test" has specified semantics for when passed a single argument,
> > which never involve treating that argument as an option, only testing
> > whether it is nonempty.
> 
> 
> Sufficiently old shells get it wrong, though. I’m not sure precisely how
> old, but I know Autoconf carefully avoids ever using test with a single
> argument for this reason.

This script uses #!/bin/bash, so there is definitely no concern about the 
shell getting it wrong.

(The rules based on the number of arguments are in the 1992 edition of 
POSIX.2.  Autoconf may well need to be concerned with proprietary systems 
(Solaris?) that had a non-POSIX /bin/sh long after then, but I don't think 
it's any problem in glibc to assume the shell and utilities, on any system 
used to build glibc, support features up to the 2008 edition of POSIX, 
which is still long before the versions of various build tools supported 
for building glibc.)

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2021-02-16 20:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 10:37 Lukasz Majewski
2021-02-10 10:37 ` [PATCH v3 2/3] support: Provide xclock_settime test helper function Lukasz Majewski
2021-02-16  5:22   ` DJ Delorie
2021-02-16 20:09     ` Lukasz Majewski
2021-02-10 10:37 ` [PATCH v3 3/3] tst: Add test for clock_settime Lukasz Majewski
2021-02-16  5:35   ` DJ Delorie
2021-02-16 20:11     ` Lukasz Majewski
2021-02-16 20:33       ` DJ Delorie
2021-02-16  5:15 ` [PATCH v3 1/3] tst: Extend cross-test-ssh.sh to specify if target date can be altered DJ Delorie
2021-02-16 18:41   ` Joseph Myers
2021-02-16 19:13     ` DJ Delorie
2021-02-16 20:33       ` Joseph Myers
2021-02-16 20:41         ` Zack Weinberg
2021-02-16 20:53           ` Joseph Myers [this message]
2021-02-16 20:57         ` DJ Delorie
2021-02-16 20:23   ` Lukasz Majewski
2021-02-16 20:41     ` DJ Delorie

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=alpine.DEB.2.22.394.2102162042330.3135710@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 read-only IMAP folder(s) and NNTP newsgroup(s).