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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71493 in the body.
You can then email your comments to 71493 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#71493; Package diffutils. (Tue, 11 Jun 2024 21:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Tue, 11 Jun 2024 21:11:01 GMT) Full text and rfc822 format available.

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

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 1 (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)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Tue, 11 Jun 2024 22:24:02 GMT) Full text and rfc822 format available.

Notification sent to Bruno Haible <bruno <at> clisp.org>:
bug acknowledged by developer. (Tue, 11 Jun 2024 22:24:03 GMT) Full text and rfc822 format available.

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

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Jul 2024 11:24:26 GMT) Full text and rfc822 format available.

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.