pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Adjust createdb TAP tests to work on recent OpenBSD. 4+ messages / 1 participants [nested] [flat]
* pgsql: Adjust createdb TAP tests to work on recent OpenBSD. @ 2021-01-08 01:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-08 01:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Adjust createdb TAP tests to work on recent OpenBSD. @ 2021-01-08 01:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-08 01:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9ffe2278372d7549547176c23564a5b3404d072e Modified Files -------------- src/bin/scripts/t/020_createdb.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Adjust createdb TAP tests to work on recent OpenBSD. @ 2021-01-08 01:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-08 01:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/29556bf1be91510ba282e02f3ec890c3b6bf4f94 Modified Files -------------- src/bin/scripts/t/020_createdb.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Adjust createdb TAP tests to work on recent OpenBSD. @ 2021-01-08 01:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2021-01-08 01:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5ba046948ed49c326d124261ae354bd9fae96489 Modified Files -------------- src/bin/scripts/t/020_createdb.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-01-08 01:36 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-01-08 01:36 pgsql: Adjust createdb TAP tests to work on recent OpenBSD. Tom Lane <tgl@sss.pgh.pa.us> 2021-01-08 01:36 pgsql: Adjust createdb TAP tests to work on recent OpenBSD. Tom Lane <tgl@sss.pgh.pa.us> 2021-01-08 01:36 pgsql: Adjust createdb TAP tests to work on recent OpenBSD. Tom Lane <tgl@sss.pgh.pa.us> 2021-01-08 01:36 pgsql: Adjust createdb TAP tests to work on recent OpenBSD. Tom Lane <tgl@sss.pgh.pa.us>
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