Bug 105866 - [PATCH] [WORKAROUND] "make test" fails randomly in t/events
[PATCH] [WORKAROUND] "make test" fails randomly in t/events
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: perl-DateManip (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-28 14:26 EDT by Michael Schwendt
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-16 21:05:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (385 bytes, patch)
2003-09-28 14:27 EDT, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2003-09-28 14:26:52 EDT
Run "rpmbuild --rebuild  perl-DateManip-5.40-30.src.rpm" several times (!) in a
row. Repeat until you see that test "t/events" fails.

Example output (this can be different because t/events performs multiple tests:

[...]
t/delta_format.........ok                                                    
t/delta_romanian.......ok                                                    
t/events...............########################
Expected = [ 2000020100:00:00 [ Winter Event1 ] ]
Got      = [ 2000020100:00:00 [ Event1 Winter ] ]
========================
Test     = 2000-02-01
########################
t/events...............FAILED test 1                                         
        Failed 1/8 tests, 87.50% okay
t/getnext..............ok                                                    
[...]


The t/events tests checks a returned list of event names and expects constant
order. But Perl's "keys" functions returns a list of keys in random order. Hence
the list must be sorted to match what is expected by test t/events.

Further details:

http://rt.cpan.org/NoAuth/Bug.html?id=3896
https://bugzilla.fedora.us/show_bug.cgi?id=714#c9


Version-Release number of selected component (if applicable):
perl-DateManip-5.40-30

How reproducible:
Always, because the Perl code is clearly wrong.
Comment 1 Michael Schwendt 2003-09-28 14:27:35 EDT
Created attachment 94802 [details]
proposed fix
Comment 2 Ville Skyttä 2003-09-28 16:14:09 EDT
I'd also appreciate if perl-DateManip would be upgraded to 5.42a while at it,
version 5.40 has problems that make some apps depending on it unusable at least
on RHL9 and UTF-8 locales, for example:

https://bugzilla.fedora.us/show_bug.cgi?id=714#c4
https://bugzilla.fedora.us/attachment.cgi?id=369&action=view

See the links in the fedora.us bugreport for an updated package (which doesn't
yet contain Michael's fix for the test failures).

[I would have bumped the severity and priority of this bug, but Bugzilla
(justifiedly) won't allow me to do it :]
Comment 3 Michael Schwendt 2003-09-28 16:45:49 EDT
For cross-reference: The UTF-8 issues are reported in bug 74884 and a duplicate,
bug 88017. If I could link bugs other than with blocks/depends_on, I would do that.

It's only "perl-libxml-enno" which depends on Date::Manip. Foomatic uses
perl-libxml-enno somehow.

I would also suggest Severn beta3 gets perl-DateManip 5.42a plus the fix for
this build-bug.
Comment 4 Michael Schwendt 2003-10-01 17:55:47 EDT
FYI: http://rt.cpan.org/NoAuth/Bug.html?id=3911

[...] Setting PERL_HASH_SEED = 0 in the build environment before running 'make
test' allows the event tests to pass without modification. [...]

This should also be an easy fix for Red Hat. Works for me with

  make PERL_HASH_SEED=0 test

in the spec file.
Comment 5 Michael Schwendt 2004-02-10 01:05:06 EST
triage->easyfix : comment 4
Comment 6 Warren Togami 2004-04-16 21:05:42 EDT
checked in, but do not know when rebuild will happen

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