Re: A test for replay of regression tests

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A test for replay of regression tests
Date: 2021-12-08 23:10:23
Message-ID: CA+hUKGLnJoeSqtp0tNyFj2GUYaNgbCQ3KTZqCfFH7QY2+Ojcdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 5, 2021 at 4:16 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> TAP tests are passed a path to pg_regress as $ENV{PG_REGRESS}. You
> should be using that. On non-MSVC, the path to a non-installed psql is
> in this case "$TESTDIR/../../bin/psql" - this should work for VPATH
> builds as well as non-VPATH. On MSVC it's a bit harder - it's
> "$top_builddir/$releasetype/psql" but we don't expose that. Perhaps we
> should. c.f. commit f4ce6c4d3a

Thanks, that helped. Here's a new version that passes on Windows,
Unix and Unix with VPATH. I also had to figure out where the DLLs
are, and make sure that various output files go to the build
directory, not source directory, if different, which I did by passing
down another similar environment variable. Better ideas? (It
confused me for some time that make follows the symlink and runs the
perl code from inside the source directory.)

This adds 2 whole minutes to the recovery check, when running with the
Windows serial-only scripts on Cirrus CI (using Andres's CI patches).
For Linux it adds ~20 seconds to the total of -j8 check-world.
Hopefully that's time well spent, because it adds test coverage for
all the redo routines, and hopefully soon we won't have to run 'em in
series on Windows.

Does anyone want to object to the concept of the "pg_user_files"
directory or the developer-only GUC "allow_relative_tablespaces"?
There's room for discussion about names; maybe initdb shouldn't create
the directory unless you ask it to, or something.

Attachment Content-Type Size
v8-0001-Allow-restricted-relative-tablespace-paths.patch text/x-patch 7.7 KB
v8-0002-Use-relative-paths-for-tablespace-regression-test.patch text/x-patch 10.4 KB
v8-0003-Test-replay-of-regression-tests.patch text/x-patch 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-12-08 23:48:20 Re: parallel vacuum comments
Previous Message Andres Freund 2021-12-08 22:45:50 port conflicts when running tests concurrently on windows.