Skip Menu |
 

This queue is for tickets about the XML-Rules CPAN distribution.

Report information
The Basics
Id: 87354
Status: open
Priority: 0/
Queue: XML-Rules

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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



Subject: t/12-infer_from_DTD.t failing with Perl 5.18
Download (untitled) / with headers
text/plain 1.7k
If I build XML-Rules with XML::DTDParser installed, I get this test failure on Perl 5.18.0 (no problems with older perls): $ ./Build test # Testing XML::Rules 1.16, Perl 5.018000, /usr/bin/perl t/00-load.t ................ ok t/01-simple_xml.t .......... ok t/02-encoding.t ............ ok t/03-output.t .............. ok t/04-filter.t .............. ok t/05-namespaces.t .......... ok t/06-whitespace.t .......... ok t/07-content_whitespace.t .. ok t/08-whitespace_more.t ..... ok t/09-whitespace_one.t ...... ok t/10-infer.t ............... ok t/11-namespaces-other.t .... ok # Failed test 'rules as expected' # at t/12-infer_from_DTD.t line 440. # Structures begin differing at: # $got->{ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber} = Does not exist # $expected->{ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber} = 'as array no content' # Looks like you failed 1 test of 5. t/12-infer_from_DTD.t ...... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests t/13-filter_attributes.t ... ok t/boilerplate.t ............ ok t/pod-coverage.t ........... ok t/pod.t .................... ok Test Summary Report ------------------- t/12-infer_from_DTD.t (Wstat: 256 Tests: 5 Failed: 1) Failed test: 5 Non-zero exit status: 1 Files=17, Tests=185, 2 wallclock secs ( 0.08 usr 0.01 sys + 1.16 cusr 0.09 csys = 1.34 CPU) Result: FAIL Failed 1/17 test programs. 1/185 subtests failed. This is with Perl 5.18.0 on Fedora Linux development version.
Download (untitled) / with headers
text/plain 2.1k
On 2013-07-26 11:09:51, paul@city-fan.org wrote: Show quoted text
> If I build XML-Rules with XML::DTDParser installed, I get this test > failure on Perl 5.18.0 (no problems with older perls): > > $ ./Build test > # Testing XML::Rules 1.16, Perl 5.018000, /usr/bin/perl > t/00-load.t ................ ok > t/01-simple_xml.t .......... ok > t/02-encoding.t ............ ok > t/03-output.t .............. ok > t/04-filter.t .............. ok > t/05-namespaces.t .......... ok > t/06-whitespace.t .......... ok > t/07-content_whitespace.t .. ok > t/08-whitespace_more.t ..... ok > t/09-whitespace_one.t ...... ok > t/10-infer.t ............... ok > t/11-namespaces-other.t .... ok > # Failed test 'rules as expected' > # at t/12-infer_from_DTD.t line 440. > # Structures begin differing at: > # $got-
> >{ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> = Does not exist > # $expected-
> >{ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> = 'as array no content' > # Looks like you failed 1 test of 5. > t/12-infer_from_DTD.t ...... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/5 subtests > t/13-filter_attributes.t ... ok > t/boilerplate.t ............ ok > t/pod-coverage.t ........... ok > t/pod.t .................... ok > Test Summary Report > ------------------- > t/12-infer_from_DTD.t (Wstat: 256 Tests: 5 Failed: 1) > Failed test: 5 > Non-zero exit status: 1 > Files=17, Tests=185, 2 wallclock secs ( 0.08 usr 0.01 sys + 1.16 > cusr 0.09 csys = 1.34 CPU) > Result: FAIL > Failed 1/17 test programs. 1/185 subtests failed. > > This is with Perl 5.18.0 on Fedora Linux development version.
The fail/pass pattern on http://matrix.cpantesters.org/?dist=XML-Rules looks familiar: fails happen only since perl 5.17.x, and not always, and never with older perls. So probably it's a problem with the hash randomization introduced in perl 5.17.x.
Download (untitled) / with headers
text/plain 2.5k
On 2014-12-30 17:03:38, SREZIC wrote: Show quoted text
> On 2013-07-26 11:09:51, paul@city-fan.org wrote:
> > If I build XML-Rules with XML::DTDParser installed, I get this test > > failure on Perl 5.18.0 (no problems with older perls): > > > > $ ./Build test > > # Testing XML::Rules 1.16, Perl 5.018000, /usr/bin/perl > > t/00-load.t ................ ok > > t/01-simple_xml.t .......... ok > > t/02-encoding.t ............ ok > > t/03-output.t .............. ok > > t/04-filter.t .............. ok > > t/05-namespaces.t .......... ok > > t/06-whitespace.t .......... ok > > t/07-content_whitespace.t .. ok > > t/08-whitespace_more.t ..... ok > > t/09-whitespace_one.t ...... ok > > t/10-infer.t ............... ok > > t/11-namespaces-other.t .... ok > > # Failed test 'rules as expected' > > # at t/12-infer_from_DTD.t line 440. > > # Structures begin differing at: > > # $got-
> > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > = Does not exist > > # $expected-
> > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > = 'as array no content' > > # Looks like you failed 1 test of 5. > > t/12-infer_from_DTD.t ...... > > Dubious, test returned 1 (wstat 256, 0x100) > > Failed 1/5 subtests > > t/13-filter_attributes.t ... ok > > t/boilerplate.t ............ ok > > t/pod-coverage.t ........... ok > > t/pod.t .................... ok > > Test Summary Report > > ------------------- > > t/12-infer_from_DTD.t (Wstat: 256 Tests: 5 Failed: 1) > > Failed test: 5 > > Non-zero exit status: 1 > > Files=17, Tests=185, 2 wallclock secs ( 0.08 usr 0.01 sys + 1.16 > > cusr 0.09 csys = 1.34 CPU) > > Result: FAIL > > Failed 1/17 test programs. 1/185 subtests failed. > > > > This is with Perl 5.18.0 on Fedora Linux development version.
> > The fail/pass pattern on http://matrix.cpantesters.org/?dist=XML-Rules > looks familiar: fails happen only since perl 5.17.x, and not always, > and never with older perls. So probably it's a problem with the hash > randomization introduced in perl 5.17.x.
It seems that the test failure can be workarounded by setting PERL_HASH_SEED=42 and PERL_PERTURB_KEYS=NO CPAN.pm users may use the following distroprefs file for automatically apply these environment variables: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/XML-Rules.yml
Download (untitled) / with headers
text/plain 1.5k
On Mon Jan 01 15:43:09 2018, SREZIC wrote: Show quoted text
> On 2014-12-30 17:03:38, SREZIC wrote:
> > On 2013-07-26 11:09:51, paul@city-fan.org wrote:
> > > t/11-namespaces-other.t .... ok > > > # Failed test 'rules as expected' > > > # at t/12-infer_from_DTD.t line 440. > > > # Structures begin differing at: > > > # $got-
> > > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > > = Does not exist > > > # $expected-
> > > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > > = 'as array no content' > > > # Looks like you failed 1 test of 5. > > > t/12-infer_from_DTD.t ...... > > > Dubious, test returned 1 (wstat 256, 0x100)
> > > > The fail/pass pattern on http://matrix.cpantesters.org/?dist=XML- > > Rules > > looks familiar: fails happen only since perl 5.17.x, and not always, > > and never with older perls. So probably it's a problem with the hash > > randomization introduced in perl 5.17.x.
> > It seems that the test failure can be workarounded by setting > PERL_HASH_SEED=42 and PERL_PERTURB_KEYS=NO > CPAN.pm users may use the following distroprefs file for automatically > apply these environment variables: > https://github.com/eserte/srezic-cpan-distroprefs/blob/master/XML- > Rules.yml
It does seem like a bug in Perl. Either in Perl or in Test::More::is_deeply(). The hash keys are apparently the same.
Download (untitled) / with headers
text/plain 109b
Ouch. I misread the report. Sorry. Seems it does happen with the version I have as well, I'll investigate it.
Download (untitled) / with headers
text/plain 2.9k
On 2018-01-01 15:43:09, SREZIC wrote: Show quoted text
> On 2014-12-30 17:03:38, SREZIC wrote:
> > On 2013-07-26 11:09:51, paul@city-fan.org wrote:
> > > If I build XML-Rules with XML::DTDParser installed, I get this test > > > failure on Perl 5.18.0 (no problems with older perls): > > > > > > $ ./Build test > > > # Testing XML::Rules 1.16, Perl 5.018000, /usr/bin/perl > > > t/00-load.t ................ ok > > > t/01-simple_xml.t .......... ok > > > t/02-encoding.t ............ ok > > > t/03-output.t .............. ok > > > t/04-filter.t .............. ok > > > t/05-namespaces.t .......... ok > > > t/06-whitespace.t .......... ok > > > t/07-content_whitespace.t .. ok > > > t/08-whitespace_more.t ..... ok > > > t/09-whitespace_one.t ...... ok > > > t/10-infer.t ............... ok > > > t/11-namespaces-other.t .... ok > > > # Failed test 'rules as expected' > > > # at t/12-infer_from_DTD.t line 440. > > > # Structures begin differing at: > > > # $got-
> > > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > > = Does not exist > > > # $expected-
> > > > {ByEmail,ByFax,ByMail,ByPhone,ByWeb,Contact,DayOfWeek,FaxNumber,HiringOrg,HowToApply,InPerson,JobPositionLocation,OrganizationalUnit,PagerNumber,PostalAddress,Recipient,TTDNumber,UL,VoiceNumber}
> > > = 'as array no content' > > > # Looks like you failed 1 test of 5. > > > t/12-infer_from_DTD.t ...... > > > Dubious, test returned 1 (wstat 256, 0x100) > > > Failed 1/5 subtests > > > t/13-filter_attributes.t ... ok > > > t/boilerplate.t ............ ok > > > t/pod-coverage.t ........... ok > > > t/pod.t .................... ok > > > Test Summary Report > > > ------------------- > > > t/12-infer_from_DTD.t (Wstat: 256 Tests: 5 Failed: 1) > > > Failed test: 5 > > > Non-zero exit status: 1 > > > Files=17, Tests=185, 2 wallclock secs ( 0.08 usr 0.01 sys + 1.16 > > > cusr 0.09 csys = 1.34 CPU) > > > Result: FAIL > > > Failed 1/17 test programs. 1/185 subtests failed. > > > > > > This is with Perl 5.18.0 on Fedora Linux development version.
> > > > The fail/pass pattern on http://matrix.cpantesters.org/?dist=XML- > > Rules > > looks familiar: fails happen only since perl 5.17.x, and not always, > > and never with older perls. So probably it's a problem with the hash > > randomization introduced in perl 5.17.x.
> > It seems that the test failure can be workarounded by setting > PERL_HASH_SEED=42 and PERL_PERTURB_KEYS=NO > CPAN.pm users may use the following distroprefs file for automatically > apply these environment variables: > https://github.com/eserte/srezic-cpan-distroprefs/blob/master/XML- > Rules.yml
Actually the proposed PERL_HASH_SEED value does not work on all perl installations. Probably the better approach is to hide the XML::DTDParser module while testing XML::Rules. This is now implemented in the mentioned distroprefs file.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.