Bug 2279842

Summary: perl-Text-Bidi-2.18-9.fc41 FTBFS: t/get_mirror_char.t fails with fribidi 1.0.14
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: fribidiAssignee: Akira TAGOH <tagoh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: gnome-sig, mclasen, michel, perl-devel, ppisar, rstrode, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fribidi-1.0.14-2.fc41 fribidi-1.0.14-2.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-05 15:17:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2290542    
Bug Blocks: 2260875    

Description Petr Pisar 2024-05-09 06:34:36 UTC
perl-Text-Bidi-2.18-9.fc41 fails to build in Fedora 41 because tests fail:

#   Failed test 'Wrong mirror for 2A9E ([BEST FIT] SIMILAR OR LESS-THAN)'
#   at t/get_mirror_char.t line 17.
#          got: '⪝'
#     expected: '⪞'

#   Failed test 'Wrong mirror for 2A9D ([BEST FIT] SIMILAR OR GREATER-THAN)'
#   at t/get_mirror_char.t line 17.
#          got: '⪞'
#     expected: '⪝'
[..]
# Looks like you failed 64 tests of 428.
t/get_mirror_char.t ....
Dubious, test returned 64 (wstat 16384, 0x4000)
Failed 64/428 subtests

This is triggered by upgrading fribidi-devel from 1.0.13-4.fc40 to
1.0.14-1.fc41. Fribidi updated Unicode database from 14.0.0 to 15.1.0.

Comment 1 Petr Pisar 2024-05-23 17:03:23 UTC
This is a bug in fribidi-1.0.14. A reproducer:

$ cat test.c 
#include <fribidi-types.h>
#include <fribidi-mirroring.h>
#include <stdio.h>

int main(void) {
    FriBidiChar input = 0x2BFE;
    FriBidiChar output;
    fribidi_boolean ret;
    
    ret = fribidi_get_mirror_char(input, &output);
    printf("input=0x%jx, output=0x%jx, fribidi_get_mirror_char() retval=%u\n", input, output, ret);

    return 0;
}

$ gcc $(pkg-config --cflags fribidi) test.c $(pkg-config --libs fribidi)

fribidi-1.0.13 correctly finds that U+2BFE mirrors to U+221F:

$ rpm -q fribidi
fribidi-1.0.13-4.fc40.x86_64
$ ./a.out 
input=0x2bfe, output=0x221f, fribidi_get_mirror_char() retval=1

However, after upgrading to 1.0.14, fribidi_get_mirror_char() thinks that U+2BFE has not mirroring chacter:

$ rpm -q fribidi
fribidi-1.0.14-1.fc41.x86_64
$ ./a.out 
input=0x2bfe, output=0x2bfe, fribidi_get_mirror_char() retval=0

I compared Unicode data sets from <https://www.unicode.org/Public/14.0.0/ucd/BidiMirroring.txt> and <https://www.unicode.org/Public/15.1.0/ucd/BidiMirroring.txt> and there is no change:

$ grep 2BFE BidiMirroring.txt-1*
BidiMirroring.txt-14.0.0:221F; 2BFE # RIGHT ANGLE
BidiMirroring.txt-14.0.0:2BFE; 221F # REVERSED RIGHT ANGLE
BidiMirroring.txt-15.1.0:221F; 2BFE # RIGHT ANGLE
BidiMirroring.txt-15.1.0:2BFE; 221F # REVERSED RIGHT ANGLE

Comment 2 Fedora Update System 2024-06-05 11:51:49 UTC
FEDORA-2024-3b2cd682c2 (fribidi-1.0.14-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3b2cd682c2

Comment 3 Fedora Update System 2024-06-05 12:38:46 UTC
FEDORA-2024-9b320d87d8 (fribidi-1.0.14-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-9b320d87d8

Comment 4 Fedora Update System 2024-06-05 15:17:22 UTC
FEDORA-2024-3b2cd682c2 (fribidi-1.0.14-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2024-06-06 02:12:26 UTC
FEDORA-2024-9b320d87d8 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-9b320d87d8`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-9b320d87d8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2024-06-21 12:35:56 UTC
FEDORA-2024-9b320d87d8 (fribidi-1.0.14-2.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.