pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: TAP tests still sensitive to various PG* environment variables
Date: Wed, 2 Jun 2021 10:49:01 +0900
Message-ID: <YLbjjRpucIeZ78VQ@paquier.xyz> (raw)

Hi all,

While looking at a separate issue, I have noticed that TestLib.pm is
lagging behind in terms of environment variables it had better mask to
avoid failures:
https://www.postgresql.org/message-id/YLXjFOV3teAPirmS@paquier.xyz

Once I began playing with the variables not covered yet, and tested
fancy cases with junk values, I have been able to see various failures
in the TAP tests, mainly with authentication and SSL.

Attached is a patch to strengthen all that, which I think we'd better
backpatch.

Any objections to that?
--
Michael

Attachments:

testlib-envs.patch (text/x-diff, 1005B) download diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index d6c3eb8723..d4f9fc5f2b 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -104,13 +104,30 @@ BEGIN delete $ENV{LC_ALL}; $ENV{LC_MESSAGES} = 'C'; + delete $ENV{PGCHANNELBINDING}; + delete $ENV{PGCLIENTENCODING}; delete $ENV{PGCONNECT_TIMEOUT}; delete $ENV{PGDATA}; delete $ENV{PGDATABASE}; + delete $ENV{PGGSSENCMODE}; + delete $ENV{PGGSSLIB}; delete $ENV{PGHOSTADDR}; + delete $ENV{PGKRBSRVNAME}; + delete $ENV{PGPASSFILE}; + delete $ENV{PGPASSWORD}; + delete $ENV{PGREQUIREPEER}; delete $ENV{PGREQUIRESSL}; delete $ENV{PGSERVICE}; + delete $ENV{PGSERVICEFILE}; + delete $ENV{PGSSLCERT}; + delete $ENV{PGSSLCRL}; + delete $ENV{PGSSLCRLDIR}; + delete $ENV{PGSSLKEY}; + delete $ENV{PGSSLMAXPROTOCOLVERSION}; + delete $ENV{PGSSLMINPROTOCOLVERSION}; delete $ENV{PGSSLMODE}; + delete $ENV{PGSSLROOTCERT}; + delete $ENV{PGSSLSNI}; delete $ENV{PGUSER}; delete $ENV{PGPORT}; delete $ENV{PGHOST};
signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)  latest in thread

Message-ID: <YLbjjRpucIeZ78VQ@paquier.xyz>
Permalink:  ../YLbjjRpucIeZ78VQ@paquier.xyz/
Also on:    postgresql.org/message-id/YLbjjRpucIeZ78VQ@paquier.xyz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: TAP tests still sensitive to various PG* environment variables
  In-Reply-To: <YLbjjRpucIeZ78VQ@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox