Fix assorted portability issues in new pgbench TAP tests.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Sep 2017 15:28:02 +0000 (11:28 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Sep 2017 15:28:02 +0000 (11:28 -0400)
* Our own version of getopt_long doesn't support abbreviation of
long options.

* It doesn't do automatic rearrangement of non-option arguments to the end,
either.

* Test was way too optimistic about the platform independence of
NaN and Infinity outputs.  I rather imagine we might have to lose
those tests altogether, but for the moment just allow case variation
and fully spelled out Infinity.

Per buildfarm.

src/bin/pgbench/t/001_pgbench_with_server.pl
src/bin/pgbench/t/002_pgbench_no_server.pl

index 032195e28a3d95a92dc1619fcfb2b45c522f34d8..66df4bc81b7f49c1cd1233fe1894bfb18c742406 100644 (file)
@@ -89,10 +89,7 @@ pgbench(
 
 # Again, with all possible options
 pgbench(
-
-   # unlogged => faster test
-   '--initialize --scale=1 --unlogged --fillfactor=98 --foreign-keys --quiet'
-     . ' --tablespace=pg_default --index-tablespace=pg_default',
+   '--initialize --scale=1 --unlogged-tables --fillfactor=98 --foreign-keys --quiet --tablespace=pg_default --index-tablespace=pg_default',
    0,
    [qr{^$}i],
    [   qr{creating tables},
@@ -220,9 +217,9 @@ pgbench(
        qr{command=18.: double 18\b},
        qr{command=19.: double 19\b},
        qr{command=20.: double 20\b},
-       qr{command=21.: double -?nan\b},
-       qr{command=22.: double inf\b},
-       qr{command=23.: double -inf\b},
+       qr{command=21.: double -?nan}i,
+       qr{command=22.: double inf}i,
+       qr{command=23.: double -inf}i,
        qr{command=24.: int 9223372036854775807\b}, ],
    'pgbench expressions',
    {   '001_pgbench_expressions' => q{-- integer functions
index acc0205f5b3219cab1cf8dd74773f56e5900ae50..631aa73ed308a7db81c35696aaeec80233b1c1d9 100644 (file)
@@ -25,7 +25,7 @@ my @options = (
 
    # name, options, stderr checks
    [   'bad option',
-       '-h home -p 5432 -U calvin -d stuff --bad-option',
+       '-h home -p 5432 -U calvin -d --bad-option',
        [ qr{unrecognized option}, qr{--help.*more information} ] ],
    [   'no file',
        '-f no-such-file',