"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: storing regress test data outside of /tmp
To:
gameoftrees@openbsd.org
Date:
Sat, 3 Oct 2020 13:46:40 +0200

Download raw body.

Thread
Stefan Sperling:

> > getopt(1) is woefully obsolete, let's use getopts:
> > 
> > rewrite argument parsing with the POSIX getopts shell built-in
> 
> Does this patch aim to allow using test root paths with spaces?

I just want to replace getopt(1).  Admittedly, that's cosmetic.

> Even with quotes added around "$OPTARG" I cannot get tests to run
> with GOT_TEST_ROOT="~/got test"

In the shell constructs

  case value in ...
  VARIABLE=value        (including export, readonly)

value is never subject to field splitting or globbing.  You only
need quotes there if the value consists of several words for the
parser, e.g. VARIABLE="$FOO BAR".

A test root path with spaces breaks because at a rough grep count
there are 8000+ unquoted uses of $testroot in the scripts.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de