Re: pgsql: Add more $Test::Builder::Level in the TAP tests

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: pgsql: Add more $Test::Builder::Level in the TAP tests
Date: 2021-10-14 03:51:11
Message-ID: YWepL/jDBoidu/Ek@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Oct 13, 2021 at 08:14:20PM -0700, Peter Geoghegan wrote:
> On Mon, Oct 11, 2021 at 7:17 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > Add more $Test::Builder::Level in the TAP tests
>
> I saw an issue just now that I suspect is linked with this commit. I
> ran my parallel "make check-world" recipe, and saw this failure:

This commit has not touched 001_basic.pl, nor does it touch any of the
modules we have in src/test/perl/, so that's unrelated. In the worst
case, what you would get after this commit is a better report by
incrementing the level stack.

The problem is that this test script assumes that it is fine to not
use -X/--no-psqlrc in the commands of psql run, making this test prone
to fail depending on the local setup. Please note that we pass down
-X through PostgresNode::psql, to keep the tests isolated from the
external world, so this could be fixed either by using -X but I think
that it would be better to switch to psql() with a comparison done to
the outputs of stdout, stderr and the error code returned. The
failure can be reproduced easily once one adds some junk in their
local psqlrc.

Adding Peter E in CC, as the author of c0280bc & co.

> # Failed test 'handling of unexpected PQresultStatus: matches'
> # at t/001_basic.pl line 43.
> # 'psql:/home/pg/.psqlrc:56: ERROR: syntax error
> # psql:/home/pg/.psqlrc:57: ERROR: syntax error
> # LOG: received replication command: START_REPLICATION 0/0
> # unexpected PQresultStatus: 8
> # '

You may also want to fix your local .psqlrc, while on it.
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-10-14 03:54:16 Re: pgsql: Add more $Test::Builder::Level in the TAP tests
Previous Message Peter Geoghegan 2021-10-14 03:14:20 Re: pgsql: Add more $Test::Builder::Level in the TAP tests