On 5/21/24 1:39 AM, Bruno Haible wrote:
>> I was taking a look at the CI stuff you wrote. Nice work, it seems
>> really helpful.
> 
> Thanks for helping! The goal here being to get all FAILs either fixed
> or declared as XFAIL, this really helps.

Sounds like a good plan. I can help with fixing the free systems but
the proprietary ones might need more XFAIL treatment. :)

I feel like MacOS will probably be problematic. I can see that it
already caused you a lot of trouble [1].

> Since this failure is not seen on Solaris 11.4, the 'defined __illumos__'
> is correct.

Yes, I saw that the regular Solaris 11 CI passed. I figured it was
best to leave the test running there. If it ever fails in the future
we can see what version causes problems.

>> I think it might be a bug in OmniOS's handling of GB 18030 but I am
>> unsure.
> 
> On these systems, every locale has its own character classifications
> tables. It can happen that they treat U+00D7 MULTIPLICATION SIGN
> as a punctuation character in the UTF-8 locale but not in the GB18030
> locale. (Glibc avoids this by computing the character classifications
> tables for all encodings from a single source.)
> 
>> Maybe I am missing a good English specification or lack the
>> ability to learn Mandarin...
> 
> You don't need to understand Mandarin in order to work GB18030.
> GB18030 is an ASCII-based encoding of all Unicode, like UTF-8, just with
> a different mapping table.

Ah, okay. Thanks for the explanations. I think I understand what is
going on now. I had a look at GNU Iconv and the charts on Wikipedia
too. No more need to learn Mandarin.

I pushed the attached patch adding the #if defined __illumos__.

Collin

[1] https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00330.html
From d7beec8902330587cda62af308d1ea629b883d7d Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Tue, 21 May 2024 02:40:14 -0700
Subject: [PATCH] fnmatch tests: Avoid test failure on OmniOS.

Using the GB18030 locale OmniOS doesn't match U+00D7 MULTIPLICATION SIGN
as a punctuation character.

* tests/test-fnmatch.c (main): Skip the test. Discovered by CI test
using OmniOS r151048 and reproduced on OmniOS r151050.
---
 ChangeLog            | 8 ++++++++
 tests/test-fnmatch.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 256b56580c..f1e5051559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-21  Collin Funk  <collin.fu...@gmail.com>
+
+	fnmatch tests: Avoid test failure on OmniOS.
+	Using the GB18030 locale OmniOS doesn't match U+00D7 MULTIPLICATION SIGN
+	as a punctuation character.
+	* tests/test-fnmatch.c (main): Skip the test. Discovered by CI test
+	using OmniOS r151048 and reproduced on OmniOS r151050.
+
 2024-05-20  Bruno Haible  <br...@clisp.org>
 
 	vasnprintf: Don't abort for pseudo-denormal arguments on macOS 12.
diff --git a/tests/test-fnmatch.c b/tests/test-fnmatch.c
index 588d76646e..96e2d1f949 100644
--- a/tests/test-fnmatch.c
+++ b/tests/test-fnmatch.c
@@ -893,7 +893,7 @@ main (int argc, char *argv[])
         /* U+20000 <CJK Ideograph> */
         ASSERT (fnmatch ("x[[:print:]]y", "x\225\062\202\066y", 0) == 0);
         #endif
-        #if !(defined __FreeBSD__ || defined __DragonFly__)
+        #if !(defined __FreeBSD__ || defined __DragonFly__ || defined __illumos__)
         /* U+00D7 MULTIPLICATION SIGN */
         ASSERT (fnmatch ("x[[:punct:]]y", "x\241\301y", 0) == 0);
         #endif
-- 
2.45.1

Reply via email to