Subject: Re: bug#76550: 30.1; Test failure for fns-tests-collate-strings with musl libc

From: Ulrich Müller <[email-masked]>
Date: Thu, 27 Feb 2025 05:58:02 +0100

>>>>> On Wed, 26 Feb 2025, Paul Eggert wrote:

> On 2/26/25 05:21, Eli Zaretskii wrote:
>> Maybe Paul has some comments or suggestions.

> I suggest the following patch.

> I see no portable way to specify an invalid locale (which is what the
> test wants), and little point to going to the trouble of trying to
> figure out exactly which platforms allow this particular string and
> which don't.

> diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
> index 3d6cd5de8fe..e97ae275da6 100644
> --- a/test/src/fns-tests.el
> +++ b/test/src/fns-tests.el
> @@ -277,7 +277,7 @@ fns-tests-collate-strings
>    (should (string-collate-equalp "xyzzy" "XYZZY" nil t))
>
>    ;; Locale must be valid.
> -  (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_XY.UTF-8")))
> +  (should-error (string-collate-equalp "xyzzy" "xyzzy" 'not-a-locale)))
>
>  ;; There must be a check for valid codepoints.  (Check not
>     implemented yet)
>  ;  (should-error

I confirm that this patch makes the test pass with musl 1.2.5.

(The __STDC_ISO_10646__ macro was introduced in musl 1.1.15, released
in 2016: https://git.musl-libc.org/cgit/musl/tree/WHATSNEW#n1707
Presumably the test would still fail with older musl versions, but I
think it is OK to ignore that.)