Subject: | Test 292 from t/text.t sometimes failing |
Date: | Fri, 29 Oct 2010 18:53:12 +0200 (CEST) |
To: | bug-Tk [...] rt.cpan.org |
From: | "E. Choroba" <choroba [...] matfyz.cz> |
When running make test for several times on the same machine, one of the tests
in t/text.t fails most of the times (approx. 80%), but sometimes it passes:
Show quoted text
--- begin example ---
$ perl -It -MTkTest -MExtUtils::Command::MM -e "check_display_harness; test_harness(0,'blib/lib','blib/arch')" t/text.t
t/text.t .. 292/415
# Failed test at t/text.t line 1548.
# ''
# doesn't match '(?-xism:PRIMARY\ selection\ doesn\'t\ exist\ or\ form\ \"STRING\"\ not\ defined)'
Stack moved 8865784 => 8865788
# Looks like you failed 1 test of 415.
t/text.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/415 subtests
(less 32 skipped subtests: 382 okay)
(1 TODO test unexpectedly succeeded)
Test Summary Report
-------------------
t/text.t (Wstat: 256 Tests: 415 Failed: 1)
Failed test: 292
TODO passed: 121
Non-zero exit status: 1
Files=1, Tests=415, 4 wallclock secs ( 0.51 usr 0.03 sys + 2.19 cusr 0.08
csys = 2.81 CPU)
Result: FAIL
Failed 1/1 test programs. 1/415 subtests failed.
$ perl -It -MTkTest -MExtUtils::Command::MM -e "check_display_harness; test_harness(0,'blib/lib','blib/arch')" t/text.t
t/text.t .. 279/415 Stack moved 8865624 => 8865628
t/text.t .. ok
All tests successful.
Test Summary Report
-------------------
t/text.t (Wstat: 0 Tests: 415 Failed: 0)
TODO passed: 121
Files=1, Tests=415, 4 wallclock secs ( 0.50 usr 0.03 sys + 2.17 cusr 0.08
csys = 2.78 CPU)
Result: PASS
--- end example ---
The following patch makes the test pass every time:
--- begin patch ---
--- t/text.t~ 2008-10-01 23:02:27.000000000 +0200
+++ t/text.t 2010-10-29 18:21:13.000000000 +0200
@@ -1544,6 +1544,7 @@
$t2->tagAdd('sel', '1.0', '1.3');
is($mw->SelectionGet, 'abc');
$mw->SelectionClear;
+ $mw->update;
eval { $mw->SelectionGet };
like($@, qr{\QPRIMARY selection doesn't exist or form "STRING" not defined});
$t2->tagAdd('sel', '1.0', '1.3');
--- end patch ---
Additional information:
Version: Tk-804.029
Perl: 5.12.1
OS: GNU/Linux 2.6.34.7-0.5 openSUSE 11.3
WM: KDE 4.4.4
I was not able to replicate the bug, though, with Perl 5.8.8, OS: GNU/Linux
2.6.24-28 Ubuntu 8.04.4, KDE 3.5.10.
E. Ch.