pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust createdb TAP tests to work on recent OpenBSD.
Date: Fri, 08 Jan 2021 01:36:25 +0000
Message-ID: <E1kxghV-0005aM-LB@gemulon.postgresql.org> (raw)

Adjust createdb TAP tests to work on recent OpenBSD.

We found last February that the error-case tests added by commit
008cf0409 failed on OpenBSD, because that platform doesn't really
check locale names.  At the time it seemed that that was only an issue
for LC_CTYPE, but testing on a more recent version of OpenBSD shows
that it's now equally lax about LC_COLLATE.

Rather than dropping the LC_COLLATE test too, put back LC_CTYPE
(reverting c4b0edb07), and adjust these tests to accept the different
error message that we get if setlocale() doesn't reject a bogus locale
name.  The point of these tests is not really what the backend does
with the locale name, but to show that createdb quotes funny locale
names safely; so we're not losing test reliability this way.

Back-patch as appropriate.

Discussion: https://postgr.es/m/231373.1610058324@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c67fea09da25463b6f6fc73fa2676ffd53e9a8e5

Modified Files
--------------
src/bin/scripts/t/020_createdb.pl | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1kxghV-0005aM-LB@gemulon.postgresql.org>
Permalink:  ../E1kxghV-0005aM-LB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kxghV-0005aM-LB@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Adjust createdb TAP tests to work on recent OpenBSD.
  In-Reply-To: <E1kxghV-0005aM-LB@gemulon.postgresql.org>
  References: <E1kxghV-0005aM-LB@gemulon.postgresql.org>

* 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