GNU bug report logs - #71493
ignore-case test fails on several platforms

Previous Next

Package: diffutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Tue, 11 Jun 2024 21:11:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#71493: closed (ignore-case test fails on several platforms)
Date: Tue, 11 Jun 2024 22:24:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 11 Jun 2024 15:23:18 -0700
with message-id <d0aea701-78d5-4b09-9176-d45f432a18cc <at> cs.ucla.edu>
and subject line Re: [bug-diffutils] bug#71493: ignore-case test fails on several platforms
has caused the debbugs.gnu.org bug report #71493,
regarding ignore-case test fails on several platforms
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
71493: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71493
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-diffutils <at> gnu.org
Subject: ignore-case test fails on several platforms
Date: Tue, 11 Jun 2024 23:10:23 +0200
[Message part 3 (text/plain, inline)]
In current diffutils (git master), I see a failure
  FAIL: ignore-case
on
  - CentOS 7,
  - macOS 11..14,
  - Solaris 11.4 and Solaris 11 OmniOS,
  - NetBSD 10.0.

How to reproduce:

$ echo 'AĀȀΆΑАӐḀἈⒶꞺA𐐀-Δ' >a
$ echo 'aāȁάαаӑḁἀⓐꞻa𐐨-δ' >b
$ LC_ALL=en_US.UTF-8 ../src/diff -i a b
1c1
< AĀȀΆΑАӐḀἈⒶꞺA𐐀-Δ
---
> aāȁάαаӑḁἀⓐꞻa𐐨-δ

On CentOS 7, when I set a breakpoint at 'hash', I see the following
char32_t values appear in order:
97 257 513 940 945 1072 1233 7681 7936 9424 42938 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, the c32tolower invocation that does not behave as expected is
the 11th character. Removing the 11th character fixes the test failure on
  - CentOS 7,
  - macOS 12,
  - Solaris 11 OmniOS.

The same procedure on Solaris 11.4 produces the following char32_t values:
97 257 513 940 945 1072 1233 7681 7936 9398 42938 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, here it's the 10th character that causes the comparison to fail.

The same procedure on NetBSD 11.0 produces the following char32_t values:
97 257 513 940 945 1072 1233 7681 7936 9398 42939 65345 66600 45 948
97 257 513 940 945 1072 1233 7681 7936 9424 42939 65345 66600 45 948
So, here it's the 10th character as well that causes the comparison to fail.

In summary, the attached patch fixes the test failure on all platforms.
It acknowledges that there is some variation between platforms, when it
comes to upper-/lowercase mappings.

Bruno


[0001-tests-Fix-ignore-case-failure-on-several-platforms.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 71493-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#71493: ignore-case test fails on several
 platforms
Date: Tue, 11 Jun 2024 15:23:18 -0700
Thanks, I installed that patch.


This bug report was last modified 345 days ago.

Previous Next


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