GNU bug report logs - #31318
emacs-26 fns-tests-collate-sort failure on glibc 2.27

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 30 Apr 2018 17:37:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 31318 <at> debbugs.gnu.org
Subject: Re: bug#31318: emacs-26 fns-tests-collate-sort failure on glibc 2.27
Date: Mon, 30 Apr 2018 22:50:29 +0300
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Mon, 30 Apr 2018 10:36:31 -0700
> 
> I upgraded to Fedora 28 beta over the weekend (Fedora 28 is scheduled 
> for release next week) and ran into one test case failure on the 
> emacs-26 branch: fns-tests-collate-sort fails (test/src/fns-tests.log is 
> attached). Looking into the test, it appears that the test is making 
> unportable assumptions about strcoll behavior in non-POSIX locales, an 
> assumption that is not true of glibc 2.27 as shipped in Fedora 28. 

Really?  So you are saying that 'ls' now sorts differently in UTF-8
locales on Fedora 28?  That is, it no longer ignores punctuation in
file names?  Doesn't that cause user outcry?

> -  ;; In a language specific locale, collation order is different.
> -  (should (string-collate-lessp
> -	   "xyzzy" "XYZZY"
> -	   (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))
> +  ;; In a language specific locale on MS-Windows, collation order is different.
> +  (when (eq system-type 'windows-nt)
> +    (should (string-collate-lessp "xyzzy" "XYZZY" "en_US.UTF-8")))

This is backwards: Windows needs enu_USA, not en_US.UTF-8 (which is
not supported on Windows).

> -  ;; Diacritics are sorted between similar letters for other locales.
> -  (should
> -   (equal
> -    (sort '("Ævar" "Agustín" "Adrian" "Eli")
> -	  (lambda (a b)
> -	    (let ((w32-collate-ignore-punctuation t))
> -	      (string-collate-lessp
> -	       a b (if (eq system-type 'windows-nt) "enu_USA" "en_US.UTF-8")))))
> -    '("Adrian" "Ævar" "Agustín" "Eli"))))
> +  ;; Diacritics are sorted between similar letters for other locales,
> +  ;; on MS-Windows systems.
> +  (when (eq system-type 'windows-nt)
> +    (should
> +     (equal
> +      (sort '("Ævar" "Agustín" "Adrian" "Eli")
> +            (lambda (a b)
> +              (let ((w32-collate-ignore-punctuation t))
> +                (string-collate-lessp
> +                 a b "enu_USA"))))
> +      '("Adrian" "Ævar" "Agustín" "Eli")))))

So none of this now works on Fedora 28?  That's too bad, don't you
think?  Why did they change the collation order?




This bug report was last modified 6 years and 35 days ago.

Previous Next


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