bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OmniOS CI failure for test-fnmatch-5.sh


From: Collin Funk
Subject: OmniOS CI failure for test-fnmatch-5.sh
Date: Tue, 21 May 2024 01:13:07 -0700
User-agent: Mozilla Thunderbird

Hi Bruno,

I was taking a look at the CI stuff you wrote. Nice work, it seems
really helpful.

I saw this test failure:

FAIL: test-fnmatch-5.sh
=======================

../../gltests/test-fnmatch.c:898: assertion 'fnmatch ("x[[:punct:]]y", 
"x\241\301y", 0) == 0' failed
Stack trace:
0x410355 main
        ../../gltests/test-fnmatch.c:898
0x405036 ???
        ???:0
0x404f97 ???
        ???:0
FAIL test-fnmatch-5.sh (exit status: 1)

In an OmniOS VM the same error occurs:

    $ uname -a
    SunOS omnios 5.11 omnios-r151050-6f87d0b5d63 i86pc i386 i86pc

The tests pass with that one check #ifdef'd out. Here is the diff I
used:

$ diff -u tests/test-fnmatch.c testdir1/gltests/test-fnmatch.c 
--- tests/test-fnmatch.c        2024-05-20 01:15:09.806829699 -0700
+++ testdir1/gltests/test-fnmatch.c     2024-05-21 00:57:41.935481891 -0700
@@ -893,7 +893,7 @@
         /* 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

I think it might be a bug in OmniOS's handling of GB 18030 but I am
unsure. Maybe I am missing a good English specification or lack the
ability to learn Mandarin...

Here is a small test program that might help you decide what is the
best solution here:

int
main (void)
{
  wchar_t wc;
  size_t result;
  mbstate_t state;
  if (setlocale (LC_ALL, "zh_CN.GB18030") == NULL)
    abort ();
  memset (&wc, '\0', sizeof (wchar_t));
  memset (&state, '\0', sizeof (mbstate_t));
  result = mbrtowc (&wc, "\241\301", 3, &state);
  if (result == (size_t) -1 || result == (size_t) -2)
    abort ();
  printf ("%s\n", iswpunct (wc) ? "PASS" : "FAIL");
  return 0;
}

On OmniOS:

    $ ./a.out 
    FAIL

On GNU/Linux:

    $ ./a.out 
    PASS

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]