0001-use-numeric-locale-in-kerberos-test-rel16.patch

text/x-patch

Filename: 0001-use-numeric-locale-in-kerberos-test-rel16.patch
Type: text/x-patch
Part: 0
Message: Re: pgsql: psql: add an optional execution-count limit to \watch.

Patch

Format: format-patch
Series: patch 0001
Subject: use numeric locale in kerberos test to work around perl bug
File+
src/test/kerberos/t/001_auth.pl 2 0
From bc187cd95f91d5a7fe97ba4ccfaf75b77e2f03c8 Mon Sep 17 00:00:00 2001
From: Anton Voloshin <a.voloshin@postgrespro.ru>
Date: Fri, 26 Apr 2024 12:24:49 +0000
Subject: [PATCH] use numeric locale in kerberos test to work around perl bug

After b124104e7 we became susceptible to Perl bug (at least on Perl
5.38.2), where on locales with non-dot fractional part separator,
floating-point constants in perl source are broken (1.15 would be '1').
Work around that by using numeric locale in this file.
---
 src/test/kerberos/t/001_auth.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl
index d74e4af464e..9475f14d50e 100644
--- a/src/test/kerberos/t/001_auth.pl
+++ b/src/test/kerberos/t/001_auth.pl
@@ -23,6 +23,8 @@ use PostgreSQL::Test::Utils;
 use PostgreSQL::Test::Cluster;
 use Test::More;
 use Time::HiRes qw(usleep);
+# Work around the Perl 5.38.2 bug: we need floating-point constants.
+use locale ':numeric';
 
 if ($ENV{with_gssapi} ne 'yes')
 {
-- 
2.43.0