Bug 1803711 - perl-Tk-804.034-9.fc33 FTBFS: t/entry.t test fails
Summary: perl-Tk-804.034-9.fc33 FTBFS: t/entry.t test fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Tk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Xavier Bachelot
QA Contact: Fedora Extras Quality Assurance
URL: https://koji.fedoraproject.org/koji/b...
Whiteboard:
Depends On:
Blocks: 1818509
TreeView+ depends on / blocked
 
Reported: 2020-02-17 09:57 UTC by Petr Pisar
Modified: 2021-07-08 01:07 UTC (History)
6 users (show)

Fixed In Version: perl-Tk-804.035-1.fc33 perl-Tk-804.035-1.fc32 perl-Tk-804.036-3.fc34 perl-Tk-804.036-3.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-08 00:57:04 UTC
Type: Bug


Attachments (Terms of Use)
Re-enable TrueType support by adding a missing font (1.48 KB, application/mbox)
2020-11-16 17:53 UTC, Mauro Carvalho Chehab
no flags Details

Description Petr Pisar 2020-02-17 09:57:12 UTC
perl-Tk-804.034-9.fc33 fails to build in Fedora 33 because tests fail like this:

t/dirtree.t .................. ok
#   Failed test at t/entry.t line 682.
#          got: '0'
#     expected: '1'
#   Failed test at t/entry.t line 691.
#          got: '0'
#     expected: '1'
#   Failed test at t/entry.t line 744.
#          got: '5'
#     expected: '6'
#   Failed test at t/entry.t line 1217.
#          got: '4'
#     expected: '5'
# Looks like you failed 4 tests of 351.
t/entry.t .................... 
Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/351 subtests 
	(less 39 skipped subtests: 308 okay)
XS_Tk__Callback_Call error:Intentional error.
XS_Tk__Callback_Call error:Intentional error.
t/errordialog.t .............. ok
[...]
Test Summary Report
-------------------
t/canvas.t                 (Wstat: 0 Tests: 166 Failed: 0)
  TODO passed:   124
t/entry.t                  (Wstat: 1024 Tests: 351 Failed: 4)
  Failed tests:  197, 201, 212, 326
  Non-zero exit status: 4
t/listbox.t                (Wstat: 0 Tests: 537 Failed: 0)
  TODO passed:   320-322, 328, 502
t/text.t                   (Wstat: 0 Tests: 415 Failed: 0)
  TODO passed:   121
t/wm-tcl.t                 (Wstat: 0 Tests: 315 Failed: 0)
  TODO passed:   86-87, 154-157, 164-165, 175-178, 221-224
                237-239, 264-265, 275-276, 280-283
t/zzScrolled.t             (Wstat: 0 Tests: 94 Failed: 0)
  TODO passed:   52, 66, 80, 94
Files=76, Tests=4361, 45 wallclock secs ( 0.78 usr  0.14 sys +  8.24 cusr  1.11 csys = 10.27 CPU)
Result: FAIL
Failed 1/76 test programs. 4/4361 subtests failed.

Comment 1 Petr Pisar 2020-02-17 10:06:10 UTC
Those are the rebased packages between last successful build and now:

Removed packages:
	annobin-9.01
	binutils-2.33.1
	binutils-gold-2.33.1
	cpio-2.12
	fedora-gpg-keys-32
	fedora-release-32
	fedora-release-common-32
	fedora-repos-32
	fedora-repos-rawhide-32
	freetype-2.10.0
	freetype-devel-2.10.0
	gdb-minimal-9.0.50.20191119
	glib2-2.63.4
	glibc-2.30.9000
	glibc-common-2.30.9000
	glibc-devel-2.30.9000
	glibc-headers-2.30.9000
	glibc-minimal-langpack-2.30.9000
	hwdata-0.331
	kernel-headers-5.5.0
	krb5-libs-1.17.1
	libarchive-3.4.0
	libblkid-2.35
	liberation-fonts-common-2.00.5
	liberation-sans-fonts-2.00.5
	libfdisk-2.35
	libmount-2.35
	libsmartcols-2.35
	libtasn1-4.15.0
	libuuid-2.35
	libxcrypt-4.4.11
	libxcrypt-devel-4.4.11
	libXt-1.1.5
	mesa-libGL-19.3.3
	mesa-libglapi-19.3.3
	pcre-8.43
	perl-Devel-PPPort-3.56
	perl-parent-0.237
	perl-Scalar-List-Utils-1.53
	python3-3.8.1
	python3-libs-3.8.1
	redhat-rpm-config-149
	sed-4.5
	sqlite-libs-3.30.1
	systemd-libs-244.1
	util-linux-2.35
	xkeyboard-config-2.28
Added packages:
	annobin-9.07
	binutils-2.34
	binutils-gold-2.34
	cpio-2.13
	dejavu-fonts-common-2.37
	dejavu-sans-fonts-2.37
	fedora-gpg-keys-33
	fedora-release-33
	fedora-release-common-33
	fedora-repos-33
	fedora-repos-rawhide-33
	freetype-2.10.1
	freetype-devel-2.10.1
	gdb-minimal-9.1
	glib2-2.63.5
	glibc-2.31
	glibc-common-2.31
	glibc-devel-2.31
	glibc-headers-2.31
	glibc-minimal-langpack-2.31
	guile-2.0.14
	hwdata-0.332
	kernel-headers-5.6.0
	krb5-libs-1.18
	langpacks-core-font-en-3.0
	libarchive-3.4.2
	libblkid-2.35.1
	liberation-fonts-common-2.1.0
	liberation-sans-fonts-2.1.0
	libfdisk-2.35.1
	libmount-2.35.1
	libsmartcols-2.35.1
	libtasn1-4.16.0
	libuuid-2.35.1
	libxcrypt-4.4.13
	libxcrypt-devel-4.4.13
	libXt-1.2.0
	mesa-libGL-20.0.0~rc2
	mesa-libglapi-20.0.0~rc2
	pcre-8.44
	perl-Devel-PPPort-3.57
	perl-parent-0.238
	perl-Scalar-List-Utils-1.54
	python3-3.8.2~rc1
	python3-libs-3.8.2~rc1
	redhat-rpm-config-151
	sed-4.8
	sqlite-libs-3.31.1
	systemd-libs-245~rc1
	util-linux-2.35.1
	xkeyboard-config-2.29
	xxhash-libs-0.7.2

Comment 2 Xavier Bachelot 2020-03-30 17:12:09 UTC
804.035 doesn't help, same test failures, both on F32 and F33. F31 is okay.

Comment 3 Jitka Plesnikova 2020-06-17 07:48:59 UTC
The problem is probably related to the fonts update. 

Notes from Tk-804.035/README:

* There are a lot more tests in Tk804. Some notably t/entry.t and
t/listbox.t very dependant on the available fonts and to a lesser
extent the window manager used. 

* By default Perl/Tk makes use of client side fonts via freetype2,
fontconfig and Xft on Unix systems. This gives anti-aliased fonts for
regular text (if you have TrueType or Type1 fonts and they are in your
fontconfig config file). See also http://fontconfig.org .
To disable this feature run the Makefile.PL
with "perl Makefile.PL XFT=0".

I tried to build Tk-804.035 with XFT=0 and the package was build successfully.

Comment 4 Jitka Plesnikova 2020-06-17 12:28:08 UTC
I am preparing rebuild for Perl 5.32.

May I update the package to Tk-804.035 and change XFT from 1 to 0?

Comment 5 Xavier Bachelot 2020-06-17 12:29:36 UTC
Sure, please go ahead.

Comment 6 Fedora Update System 2020-06-17 14:32:43 UTC
FEDORA-2020-a726a87414 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-a726a87414

Comment 7 Fedora Update System 2020-06-18 14:13:59 UTC
FEDORA-2020-a726a87414 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-a726a87414`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-a726a87414

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

Comment 8 Fedora Update System 2020-06-26 00:45:54 UTC
FEDORA-2020-a726a87414 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Mauro Carvalho Chehab 2020-11-16 14:26:36 UTC
(In reply to Jitka Plesnikova from comment #3)
> The problem is probably related to the fonts update. 

I don't think so. Building it by hand, with XFT=1 and either doing "make test" or running the unit test alone:


   $ perl -It -MTkTest -e "checked_test_harness('./xt', 0, 'blib/lib', 'blib/arch')"  t/entry.t 
   t/entry.t .. ok       
   All tests successful.
   Files=1, Tests=351,  2 wallclock secs ( 0.04 usr  0.01 sys +  2.10 cusr  0.03 csys =  2.18 CPU)
   Result: PASS

Works.

The only difference I see is that, when building with mock, the output is not displayed. I'm starting to suspect that the unit test is failing due to some limitation at mock to emulate a X11/Wayland console, e. g. probably some incompatibility with xorg-x11-server-Xvfb.

Comment 10 Mauro Carvalho Chehab 2020-11-16 14:57:01 UTC
(In reply to Mauro Carvalho Chehab from comment #9)
> (In reply to Jitka Plesnikova from comment #3)
> > The problem is probably related to the fonts update. 
> 
> I don't think so. Building it by hand, with XFT=1 and either doing "make
> test" or running the unit test alone:
> 
> 
>    $ perl -It -MTkTest -e "checked_test_harness('./xt', 0, 'blib/lib',
> 'blib/arch')"  t/entry.t 
>    t/entry.t .. ok       
>    All tests successful.
>    Files=1, Tests=351,  2 wallclock secs ( 0.04 usr  0.01 sys +  2.10 cusr 
> 0.03 csys =  2.18 CPU)
>    Result: PASS
> 
> Works.
> 
> The only difference I see is that, when building with mock, the output is
> not displayed. I'm starting to suspect that the unit test is failing due to
> some limitation at mock to emulate a X11/Wayland console, e. g. probably
> some incompatibility with xorg-x11-server-Xvfb.

Funny enough, running:

   xvfb-run -a perl -It -MTkTest -e "checked_test_harness('./xt', 0, 'blib/lib', 'blib/arch')"  t/entry.t

or

   xvfb-run -a make test

works fine too. Perhaps it requires some extra package for the tests to pass on mock?

Comment 11 Mauro Carvalho Chehab 2020-11-16 16:41:22 UTC
Ok, with this small patch:

diff --git a/t/entry.t b/t/entry.t
index c9e99b87ab81..7192776685ad 100755
--- a/t/entry.t
+++ b/t/entry.t
@@ -677,6 +677,7 @@ eval { $e->destroy };
 $e = $mw->Entry(-font => $fixed, -bd => 2, -relief => "raised")->pack;
 $e->insert(end => "0123");
 $e->update;
+diag sprintf "Font: $fixed, Geometry data: %s", $e->geometry;
 is($e->index('@10'), 0, "index with raised relief");
 with_fixed_font { is($e->index('@11'), 0) };
 is($e->index('@12'), 1);

It can be seen the differences between a build on a machine with X11 properly installed:

  $  perl -It -MTkTest -e 'checked_test_harness('\''./xt'\'', 0, '\''blib/lib'\'', '\''blib/arch'\'')' t/entry.t
  t/entry.t .. 193/351 # Font: -adobe-courier-medium-r-normal--12-120-75-75-m-*-iso8859-1, Geometry data: 150x23+0+0
  t/entry.t .. ok       
  All tests successful.
  Files=1, Tests=351,  2 wallclock secs ( 0.04 usr  0.01 sys +  1.95 cusr  0.03 csys =  2.03 CPU)
  Result: PASS

And a build with mock:

  + xvfb-run -a perl -It -MTkTest -e 'checked_test_harness('\''./xt'\'', 0, '\''blib/lib'\'', '\''blib/arch'\'')' t/entry.t
  # 
  # 
  # Font: -adobe-courier-medium-r-normal--12-120-75-75-m-*-iso8859-1, Geometry data: 170x25+0+0
  # 
  # 

  #   Failed test at t/entry.t line 684.
  #          got: '0'
  #     expected: '1'

  #   Failed test at t/entry.t line 693.
  #          got: '0'
  #     expected: '1'

  #   Failed test at t/entry.t line 746.
  #          got: '5'
  #     expected: '6'

  #   Failed test at t/entry.t line 1219.
  #          got: '4'
  #     expected: '5'
  # Looks like you failed 4 tests of 351.
  t/entry.t .. 
  Dubious, test returned 4 (wstat 1024, 0x400)
  Failed 4/351 subtests 
	(less 39 skipped subtests: 308 okay)

I suspect that some additional packages are required for the adobe-currier font, libXft and fontconfig to be properly installed/initialized inside mock chroot.

Comment 12 Mauro Carvalho Chehab 2020-11-16 17:50:08 UTC
Found it!

events.t requires google-noto-sans-fonts in order to pass. I'll enclose a patch on this BZ.

Comment 13 Mauro Carvalho Chehab 2020-11-16 17:53:17 UTC
Created attachment 1729853 [details]
Re-enable TrueType support by adding a missing font

Comment 14 Petr Pisar 2020-11-16 18:03:42 UTC
I doubt google-noto-sans-fonts is the cause. This package predates Noto font. Also you can see that the font is not listed in the installed package set <https://kojipkgs.fedoraproject.org//packages/perl-Tk/804.034/8.fc32/data/logs/x86_64/root.log> for the last successful build before the XFT was disabled. I'd rather bet on FontConfig cache not being updated or the metrics of the exhibited font being removed or moved to a different package. Also note that -adobe-courier-medium-r-normal--12-120-75-75-m-*-iso8859-1 is the old non-FT font specification. So if indeed that font was used, then no XFT was involved.

Comment 15 Mauro Carvalho Chehab 2020-11-16 18:19:17 UTC
(In reply to Petr Pisar from comment #14)
> I doubt google-noto-sans-fonts is the cause. This package predates Noto
> font. Also you can see that the font is not listed in the installed package
> set
> <https://kojipkgs.fedoraproject.org//packages/perl-Tk/804.034/8.fc32/data/
> logs/x86_64/root.log> for the last successful build before the XFT was
> disabled. I'd rather bet on FontConfig cache not being updated or the
> metrics of the exhibited font being removed or moved to a different package.
> Also note that -adobe-courier-medium-r-normal--12-120-75-75-m-*-iso8859-1 is
> the old non-FT font specification. So if indeed that font was used, then no
> XFT was involved.

I tested installing xorg-x11-fonts-ISO8859-1-75dpi, which should be carrying adobe-courier font, but installing it didn't make any change.

I agree that this could be due to FontConfig cache, but it could also be due to some font replacement setup that would happen when this font is installed.

In either case, before coming up with this solution, I tried to install other packages that would make more sense, but everything failed until this one got installed. After installing it, mock was able to successfully the package on both Fedora 33 and rawhide.

Comment 16 Ben Cotton 2021-02-09 15:14:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 17 Fedora Update System 2021-06-29 08:30:27 UTC
FEDORA-2021-49127bd223 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-49127bd223

Comment 18 Fedora Update System 2021-06-30 14:19:55 UTC
FEDORA-2021-49127bd223 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-49127bd223`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-49127bd223

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

Comment 19 Fedora Update System 2021-06-30 14:24:24 UTC
FEDORA-2021-639b8bfb6e has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-639b8bfb6e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-639b8bfb6e

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

Comment 20 Fedora Update System 2021-07-08 00:57:04 UTC
FEDORA-2021-639b8bfb6e has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2021-07-08 01:07:47 UTC
FEDORA-2021-49127bd223 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.