Skip Menu |

This queue is for tickets about the Tcl-pTk CPAN distribution.

Report information
The Basics
Id: 119754
Status: patched
Priority: 0/
Queue: Tcl-pTk

People
Owner: CAC [...] cpan.org
Requestors: PERLMAX [...] cpan.org
Cc: CAC [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.92
Fixed in: (no value)



Subject: Test Result: FAIL in Ubuntu 16.10
Hello all, First thank you very much for your work. I noticed that the test fails under my ubuntu system. Here are the test report: Test Summary Report ------------------- t/bgerror2.t (Wstat: 0 Tests: 4 Failed: 4) Failed tests: 1-4 t/fontAttr.t (Wstat: 0 Tests: 8 Failed: 2) Failed tests: 5-6 t/tkHijack_bgerror2.t (Wstat: 0 Tests: 4 Failed: 4) Failed tests: 1-4 Files=121, Tests=425, 192 wallclock secs ( 0.30 usr 0.08 sys + 11.94 cusr 1.62 csys = 13.94 CPU) Result: FAIL Failed 3/121 test programs. 10/425 subtests failed. Makefile:1626: die Regel für Ziel „test_dynamic“ scheiterte make: *** [test_dynamic] Fehler 255 Best wishes, Max
Enclosed the full output of make test
Subject: make_test.txt
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/after.t ..................... ok t/afterDestroy.t .............. ok t/afterIdle.t ................. ok t/balloon.t ................... ok t/balloon2.t .................. Balloon should appear over 'Balloon Text' button t/balloon2.t .................. ok t/bgerror1.t .................. ok t/bgerror2.t .................. 1/4 # Failed test 1 in t/bgerror2.t at line 139 # t/bgerror2.t line 139 is: ok( $errMessages =~ /Undefined subroutine\s+\&main\:\:bogus/); # Failed test 2 in t/bgerror2.t at line 140 # t/bgerror2.t line 140 is: ok( $errMessages =~ /command executed by scale/); # Failed test 3 in t/bgerror2.t at line 141 # t/bgerror2.t line 141 is: ok( $errMessages =~ /Error Started at t\/bgerror2.t line 123/); # Failed test 4 in t/bgerror2.t at line 142 # t/bgerror2.t line 142 is: ok( $errMessages =~ / Undefined subroutine \&main::bogus called at t\/bgerror2.t line 112/); t/bgerror2.t .................. Failed 4/4 subtests t/bgerror3.t .................. Error Dialog Should Show. This is expected t/bgerror3.t .................. ok t/bind.t ...................... ok t/bindBreak.t ................. ok t/bitmapSubClass.t ............ ok t/browseEntry.t ............... ok t/browseEntry2.t .............. ok t/busy.t ...................... ok t/callback.t .................. ok t/callbackSet.t ............... ok t/canFind.t ................... ok t/canIndex.t .................. ok t/canScale.t .................. ok t/checkradio.t ................ ok t/cleanupCrashTest.t .......... ok t/command.t ................... ok t/configureReturn.t ........... ok t/dialog.t .................... ok t/dialogBox.t ................. ok t/dirtree.t ................... ok t/dndlocal.t .................. ok t/emptyMenuButtonSubclass.t ... ok t/emptyMenuSubclass.t ......... ok t/emptySubclass.t ............. ok t/entry.t ..................... ok t/entryPaste.t ................ ok t/entryValidate.t ............. ok t/fileevent.t ................. ok t/fileevent2.t ................ ok t/font.t ...................... ok t/font2.t ..................... ok t/fontAttr.t .................. 1/8 # Test 5 got: "139" (t/fontAttr.t at line 67 fail #3) # Expected: "144" (Font->actual TkDefaultFont Attr Check) # t/fontAttr.t line 67 is: skip($skip, $widthTest1, $widthTest2, "Font->actual $fontName Attr Check"); # Test 6 got: "144" (t/fontAttr.t at line 68 fail #3) # Expected: "139" ($widget->fontActual TkDefaultFont Attr Check) # t/fontAttr.t line 68 is: skip($skip, $widthTest2, $widthTest3, "\$widget->fontActual $fontName Attr Check"); t/fontAttr.t .................. Failed 2/8 subtests t/frameForeground.t ........... ok t/geomgr.t .................... ok t/hlist.t ..................... ok t/iconimage.t ................. ok t/imageLoad.t ................. ok t/itemStyle.t ................. ok t/labEntry.t .................. ok t/labEntryFacelift.t .......... ok t/labEntryParentChild.t ....... ok t/libLoad.t ................... ok t/listbox.t ................... ok t/mainloopMult.t .............. ok t/menub-cascade.t ............. ok t/menub_newMenu.t ............. ok t/menubarpath.t ............... ok t/menuitems.t ................. ok t/messageBox.t ................ ok t/moveResizeWindow.t .......... ok t/moveToplevelWindow.t ........ ok t/multMainWindow1.t ........... ok t/multMainWindow2.t ........... ok t/notebook.t .................. ok t/onDestroy.t ................. ok t/optmenu.t ................... ok t/palette.t ................... ok t/pane.t ...................... ok t/photo.t ..................... skipped: no Img extension available (can't find package Img at /home/maximilian/.cpanm/work/1483816950.7405/Tcl-pTk-0.92/blib/lib/Tcl/pTk.pm line 1168. t/photoGetImage.t ............. skipped: no Img extension available (can't find package Img at /home/maximilian/.cpanm/work/1483816950.7405/Tcl-pTk-0.92/blib/lib/Tcl/pTk.pm line 1168. t/photoSubClass.t ............. ok t/progBar.t ................... ok t/protocol.t .................. ok t/ptk-compat.t ................ ok t/ptk-compat2.t ............... ok t/repeat.t .................... ok t/repeatSubReuse.t ............ ok t/scrolled.t .................. ok t/scrolledOptional.t .......... ok t/selection.t ................. ok t/slideMegaWidget.t ........... ok t/slideMegaWidget2.t .......... ok t/spreadsheetHideRows.t ....... ok t/table.t ..................... ok t/tableFacelift.t ............. ok t/tableMatrixCallbacks.t ...... ok t/tableMatrixCleanup.t ........ ok t/tableMatrixDebug.t .......... ok t/tableMatrixSpreadsheet.t .... ok t/tclVersion.t ................ ok t/text.t ...................... ok t/text2.t ..................... ok t/text3.t ..................... ok t/textEdit.t .................. ok t/textRO.t .................... ok t/textSubwidget.t ............. ok t/textUndo.t .................. ok t/tileLabelFont.t ............. ok t/tileTree.t .................. ok t/tileWidget.t ................ ok t/tixTree.t ................... ok t/tk-mw.t ..................... ok t/tkFacelift_BEsubclass.t ..... ok t/tkFacelift_browseEntry.t .... ok t/tkFacelift_frameSubclass.t .. ok t/tkFacelift_mega1.t .......... ok t/tkFacelift_simple.t ......... ok t/tkHijack_BEsubclass.t ....... ok t/tkHijack_bgerror1.t ......... ok t/tkHijack_bgerror2.t ......... 1/4 # Failed test 1 in t/tkHijack_bgerror2.t at line 140 # t/tkHijack_bgerror2.t line 140 is: ok( $errMessages =~ /Undefined subroutine\s+\&main\:\:bogus/); # Failed test 2 in t/tkHijack_bgerror2.t at line 141 # t/tkHijack_bgerror2.t line 141 is: ok( $errMessages =~ /command executed by scale/); # Failed test 3 in t/tkHijack_bgerror2.t at line 142 # t/tkHijack_bgerror2.t line 142 is: ok( $errMessages =~ /Error Started at t\/tkHijack_bgerror2.t line 124/); # Failed test 4 in t/tkHijack_bgerror2.t at line 143 # t/tkHijack_bgerror2.t line 143 is: ok( $errMessages =~ / Undefined subroutine \&main::bogus called at t\/tkHijack_bgerror2.t line 113/); t/tkHijack_bgerror2.t ......... Failed 4/4 subtests t/tkHijack_bgerror3.t ......... ok t/tkHijack_mega1.t ............ ok t/tkHijack_simple.t ........... ok t/tkHijack_spreadsheet.t ...... ok t/trace.t ..................... ok t/tree.t ...................... ok t/ttkBrowseEntry.t ............ ok t/ttkEntryValidate.t .......... ok t/unicode.t ................... ok t/virtualEv.t ................. ok t/widgetDelete.t .............. ok t/widgetName.t ................ ok t/wmForget.t .................. ok t/xevent.t .................... ok t/zzPhoto.t ................... skipped: no Img extension available Test Summary Report ------------------- t/bgerror2.t (Wstat: 0 Tests: 4 Failed: 4) Failed tests: 1-4 t/fontAttr.t (Wstat: 0 Tests: 8 Failed: 2) Failed tests: 5-6 t/tkHijack_bgerror2.t (Wstat: 0 Tests: 4 Failed: 4) Failed tests: 1-4 Files=121, Tests=425, 196 wallclock secs ( 0.39 usr 0.11 sys + 14.10 cusr 2.14 csys = 16.74 CPU) Result: FAIL Failed 3/121 test programs. 10/425 subtests failed. Makefile:1626: die Regel für Ziel „test_dynamic“ scheiterte make: *** [test_dynamic] Fehler 255
On Sat Jan 07 13:28:21 2017, PERLMAX wrote:
> t/bgerror2.t .................. 1/4 # Failed test 1 in t/bgerror2.t at line 139
> #  t/bgerror2.t line 139 is: ok( $errMessages =~ /Undefined subroutine\s+\&main\:\:bogus/);
> # Failed test 2 in t/bgerror2.t at line 140
> #  t/bgerror2.t line 140 is: ok( $errMessages =~ /command executed by scale/);
> # Failed test 3 in t/bgerror2.t at line 141
> #  t/bgerror2.t line 141 is: ok( $errMessages =~ /Error Started at t\/bgerror2.t line 123/);
> # Failed test 4 in t/bgerror2.t at line 142
> #  t/bgerror2.t line 142 is: ok( $errMessages =~ / Undefined subroutine \&main::bogus called at t\/bgerror2.t line 112/);
> t/bgerror2.t .................. Failed 4/4 subtests 

I haven't confirmed yet, but I believe the reason that both t/bgerror2.t and t/tkHijack_bgerror2.t fail is because of Tcl::pTk's use of AUTOLOAD, which is used to translate unimplemented Perl functions to Tcl calls, but as a side effect it causes this "Undefined subroutine" error not appear, and to instead likely result in an entirely different error from the Tcl call failing.

See this response I left for a newer ticket: https://rt.cpan.org/Ticket/Display.html?id=125460#txn-1790283
I can reproduce the issue with bgerror2.t failing on Windows and Linux (Fedora 27, Ubuntu 18.04) but for some reason it passes on macOS (10.13, Tcl/Tk 8.5.9).

I haven't reproduced the issue with fontAttr.t on any OS.

Some other tests appear to fail depending on the OS, so I will try reporting those in more detail.
On Sun Jun 10 02:27:36 2018, CAC wrote:
> On Sat Jan 07 13:28:21 2017, PERLMAX wrote:
> > t/bgerror2.t .................. 1/4 # Failed test 1 in t/bgerror2.t at line 139
> > #  t/bgerror2.t line 139 is: ok( $errMessages =~ /Undefined subroutine\s+\&main\:\:bogus/);
> > # Failed test 2 in t/bgerror2.t at line 140
> > #  t/bgerror2.t line 140 is: ok( $errMessages =~ /command executed by scale/);
> > # Failed test 3 in t/bgerror2.t at line 141
> > #  t/bgerror2.t line 141 is: ok( $errMessages =~ /Error Started at t\/bgerror2.t line 123/);
> > # Failed test 4 in t/bgerror2.t at line 142
> > #  t/bgerror2.t line 142 is: ok( $errMessages =~ / Undefined subroutine \&main::bogus called at t\/bgerror2.t line 112/);
> > t/bgerror2.t .................. Failed 4/4 subtests 
> I haven't confirmed yet, but I believe the reason that both
Show quoted text
> t/bgerror2.t and t/tkHijack_bgerror2.t fail is because of
> Tcl::pTk's use of AUTOLOAD, which is used to translate
> unimplemented Perl functions to Tcl calls, but as a side
> effect it causes this "Undefined subroutine" error not appear, and to
> instead likely result in an entirely different error from the Tcl call
> failing.


Actually, the undefined subroutine is fully-qualified (main::bogus()) and not something that Tcl::pTk's AUTOLOAD will try to provide. What's happening is that the subroutine for the SlideSwitch -command is never entered. That means there should be e.g. `Switch value is '1'` printed at some point during the test. Maybe what's missing is an `$mw->after()` statement that programmatically moves the SlideSwitch from 0 to 1.

But even then the expected match is rather picky by requiring a forward slash ('t/bgerror2.t' and not e.g. '.\t\bgerror2.t' as it could be on Windows) and the exact line number (which I think poses a maintenance nuisance).
I have added fixes for bgerror2.t and tkHijack_bgerror2.t in commit 202d929, so those should PASS in the next release. I also changed how expected errors are checked by not relying on hardcoded line numbers or filenames.
 
I'm still not sure what might have caused fontAttr.t to fail, nor have found any FAIL reports on CPAN Testers for fontAttr.t. Is the failure still reproducible? I'm inclined to close this as RESOLVED since Ubuntu 16.10 is unsupported.
After looking through more CPAN testers' reports, bgerror2.t was not always failing as I would expect (similar to how it passed on my Mac a while back). So there's probably a false PASS issue in it as well; I have opened ticket #126934 regarding this.
On Wed Aug 22 07:41:31 2018, CAC wrote:
Show quoted text
> I'm still not sure what might have caused fontAttr.t to fail, nor have found any
> FAIL reports on CPAN Testers for fontAttr.t. Is the failure still reproducible?

I have managed to get platform-dependent failures for font.t that resemble the one you observed for fontAttr.t. Notably, the failures you observed involved for TkDefaultFont, which the previous Tcl::pTk maintainer encountered some issues with. However, the failures I observe are for Times, which is usually skipped unless on macOS because it doesn't accept substitutes like "Times New Roman".

For now I'm inclined make any font size or measurement tests TODO, because I haven't found exactly how Tk will behave in these cases, nor whether this is due to a Tk bug. According to Perl/Tk's maintainer, the font sizes were always given back in pixels. This does not seem to be the case for Tcl/Tk, where specifying e.g. "Times -12 bold" (negative size indicating pixels rather than points) will have size 12 (points) on macOS, which seems reasonable given 72 DPI scaling in use, but still not what font.t was expecting (-12, i.e. pixels). I have not yet found a way to get Tk to give back the size in a desired unit, and even when font actual returns the size in the unit originally specified, it still doesn't always match the value specified (as what I think has happened on your machine), especially for larger font sizes.