GNU bug report logs - #76550
30.1; Test failure for fns-tests-collate-strings with musl libc

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Tue, 25 Feb 2025 11:53:01 UTC

Severity: minor

Found in version 30.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 76550 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Müller <ulm <at> gentoo.org>
To: 76550 <at> debbugs.gnu.org
Subject: Re: 30.1; Test failure for fns-tests-collate-strings with musl libc
Date: Tue, 25 Feb 2025 17:06:04 +0100
[Message part 1 (text/plain, inline)]
Would attached patch be acceptable as a fix?

[0001-Fix-fns-tests.el-with-musl-libc.patch (text/plain, inline)]
From 403191534a1dda4e396ae05dd8a34c3230e9a7fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
Date: Tue, 25 Feb 2025 17:03:02 +0100
Subject: [PATCH] ; Fix fns-tests.el with musl libc

* test/src/fns-tests.el (fns-tests-collate-strings): Don't test
for valid locale with musl libc.  (Bug#76550)
---
 test/src/fns-tests.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 9e134c24e05..f15896cfd57 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -277,7 +277,9 @@ 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")))
+  ;; musl's newlocale(3) is lenient about locale validation (bug#76550).
+  (unless (string-match-p "-musl" system-configuration)
+    (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_XY.UTF-8"))))
 
 ;; There must be a check for valid codepoints.  (Check not implemented yet)
 ;  (should-error
-- 
2.48.1


This bug report was last modified 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.