New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solaris Failing Some Locale Tests #16537
Comments
From carlos@carlosguevara.comThis is a bug report for perl from "Carlos Guevara" <carlos@carlosguevara.com>, Solaris is failing some locale tests: Flags: Site configuration information for perl 5.28.0: Configured by cpan at Thu Apr 26 22:26:15 CDT 2018. Summary of my perl5 (revision 5 version 28 subversion 0) configuration: @INC for perl 5.28.0: Environment for perl 5.28.0: |
From @khwilliamsonOn 04/26/2018 10:07 PM, Carlos Guevara (via RT) wrote:
The problem is that these locales have a UTF-8 decimal radix character, In the meantime, solaris smokes are failing. I've made this a 5.28 Also, this is openindiana solaris. I have no idea if Oracle solaris has
|
From @khwilliamson#include <stdio.h>
#include <locale.h>
int
main(int argc, char ** argv)
{
char buf[100];
unsigned int i;
printf("%s\n", setlocale(LC_ALL, "ar_AE.UTF8"));
snprintf(buf, sizeof(buf), "%g", 3.2);
for (i = 0; i < sizeof(buf); i++) {
if (buf[i] == '\0') break;
printf(" %x", buf[i]);
}
printf("\n");
} |
The RT System itself - Status changed from 'new' to 'open' |
From carlos@carlosguevara.comRevised radix.c: int printf("%s\n", setlocale(LC_ALL, "ar_AE.UTF-8")); for (i = 0; i < sizeof(buf); i++) { Output: |
From @khwilliamsonOn 04/27/2018 09:56 PM, Carlos Guevara wrote:
That should instead have been 33 d9 ab 32. I'll submit a trouble ticket for them. |
From @khwilliamsonOn 04/27/2018 10:24 PM, Karl Williamson wrote:
Now done as https://www.illumos.org/issues/9511 |
From @khwilliamsonOn 04/28/2018 10:02 AM, Karl Williamson wrote:
Attached are three patches that cause these tests to pass on solaris. A I think these patches, after the versioning is ironed out, should go in |
From @khwilliamson0002-t-run-locale.t-Skip-some-Solaris-locales.patchFrom bd0d1ba4062ea201cb26e4d5690e76f00a3f9287 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Thu, 19 Apr 2018 14:43:43 -0600
Subject: [PATCH 2/4] t/run/locale.t: Skip some Solaris locales
Solaris is buggy in dealing with locales that have a multi-byte UTF-8
decimal radix character. Skip using these, like we do on cygwin, which
has a similar problem.
---
t/run/locale.t | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/t/run/locale.t b/t/run/locale.t
index 13bc25d7a7..282fbb5f86 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -88,6 +88,13 @@ if ($non_C_locale) {
@test_numeric_locales = grep { $_ !~ m/ps_AF/i } @test_numeric_locales;
}
+ # Similarly the arabic locales on solaris don't work right on the
+ # multi-byte radix character, generating malformed UTF-8.
+ if ($^O eq 'solaris') {
+ @test_numeric_locales = grep { $_ !~ m/ ^ ( ar_ | pa_ ) /x }
+ @test_numeric_locales;
+ }
+
fresh_perl_is("for (qw(@test_numeric_locales)) {\n" . <<'EOF',
use POSIX qw(locale_h);
use locale;
--
2.11.0
|
From @khwilliamson0003-lib-locale.t-Mark-a-test-problematic.patchFrom 57e2dd7f14b426e28eab0b11640ba1b921daf080 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Sat, 28 Apr 2018 10:16:08 -0600
Subject: [PATCH 3/4] lib/locale.t: Mark a test problematic
We now have found a system that fails this test. Tests that are listed
as problematic automatically get marked as TODO when they fail with
specified platforms. The next commit will specify the platform that
this is fails on.
---
lib/locale.t | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/locale.t b/lib/locale.t
index 85843acae7..638e21cff0 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -2237,6 +2237,7 @@ foreach my $Locale (@Locale) {
report_result($Locale, ++$locales_test_number, $ok15);
$test_names{$locales_test_number} = 'Verify that a number with a UTF-8 radix has a UTF-8 stringification';
+ $problematical_tests{$locales_test_number} = 1;
report_result($Locale, ++$locales_test_number, $ok16);
$test_names{$locales_test_number} = 'Verify that a sprintf of a number with a UTF-8 radix yields UTF-8';
--
2.11.0
|
From @khwilliamson0004-lib-locale.t-TODO-some-locales-on-Solaris.patchFrom 54749c361a30cfad35542ed0841956477ae3fa32 Mon Sep 17 00:00:00 2001
From: Karl Williamson <khw@cpan.org>
Date: Sat, 28 Apr 2018 10:18:05 -0600
Subject: [PATCH 4/4] lib/locale.t: TODO some locales on Solaris
There is a bug in Solaris with locales which have a multi-byte decimal
radix character. Make these TODO, like we do cygwin, which has had a
similar problem.
---
lib/locale.t | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/locale.t b/lib/locale.t
index 638e21cff0..17931c894d 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -78,6 +78,11 @@ my %known_bad_locales = (
darwin => qr/ ^ lt_LT.ISO8859 /ix,
os390 => qr/ ^ italian /ix,
netbsd => qr/\bISO8859-2\b/i,
+
+ # This may be the same bug as the cygwin below; it's
+ # generating malformed UTF-8 on the radix being
+ # mulit-byte
+ solaris => qr/ ^ ( ar_ | pa_ ) /x,
);
# cygwin isn't returning proper radix length in this locale, but supposedly to
--
2.11.0
|
From @xsawyerxOn 04/28/2018 07:24 PM, Karl Williamson wrote:
I'd like one of the committers to approve this before it is merged to |
From @iabynOn Mon, Apr 30, 2018 at 11:50:45PM +0300, Sawyer X wrote:
I approve, and and just merged them, as v5.27.11-26-ge3e8c0d65c As regards the specifics of openindiana id and versions, that can -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#133157 (status was 'resolved')
Searchable as RT133157$
The text was updated successfully, but these errors were encountered: