Skip Menu |
 

This queue is for tickets about the Net-Jabber CPAN distribution.

Report information
The Basics
Id: 87436
Status: open
Priority: 0/
Queue: Net-Jabber

People
Owner: Nobody in particular
Requestors: d.stremkovskiy [...] corp.mail.ru
Cc: dom [...] cpan.org
AdminCc:

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

Attachments


Subject: Test fail for 2.0 on 5.18.0
Date: Tue, 30 Jul 2013 15:32:45 +0400
To: bug-Net-Jabber [...] rt.cpan.org
From: Dmitriy Stremkovskiy <d.stremkovskiy [...] corp.mail.ru>
Download (untitled) / with headers
text/plain 1.6k
Hello. I use prefixed perl (/usr/local/perl5.18.0/...) and all of its components on the server based on Centos 6.4 x86_64. Server is firewalled and has no access to outside except via proxy. I've succesfully built all needed dependecies. All modules have passed 'make test' phase. Now, i'm trying to build perl-Net-Jabber module. Build went ok, however make test failed on t/protocol_rpc.t .............. 1/19 # Failed test (t/protocol_rpc.t at line 40) # got: '<query xmlns='jabber:iq:rpc'><methodResponse><params><param><value><string>foo</string></value></param><param><value><i4>4</i4></value></param><param><value><struct><member><name>b</name><value><string>bar</string></value></member><member><name>a</name><value><i4>1</i4></value></member></struct></value></param><param><value><array><data><value><string>a</string></value></data><data><value><i4>1</i4></value></data><data><value><string>foo</string></value></data></array></value></param></params></methodResponse></query>' # expected: '<query xmlns='jabber:iq:rpc'><methodResponse><params><param><value><string>foo</string></value></param><param><value><i4>4</i4></value></param><param><value><struct><member><name>a</name><value><i4>1</i4></value></member><member><name>b</name><value><string>bar</string></value></member></struct></value></param><param><value><array><data><value><string>a</string></value></data><data><value><i4>1</i4></value></data><data><value><string>foo</string></value></data></array></value></param></params></methodResponse></query>' # Looks like you failed 1 tests of 19. t/protocol_rpc.t .............. Dubious, test returned 1 (wstat 256, 0x100) Looks like wrong order in test. -- WBR, Dmitriy Stremkovskiy.
Subject: [rt.cpan.org #87436] Test fail for 2.0 on 5.18.0
Date: Tue, 30 Jul 2013 16:35:48 +0400
To: bug-Net-Jabber [...] rt.cpan.org
From: Дмитрий Стремковский <d.stremkovskiy [...] corp.mail.ru>
Download (untitled) / with headers
text/plain 399b
Hm-m, looks like i forgot to install some other deps. Installftion of: perl-Crypt-SSLeay perl-HTTP-Body perl-HTTP-Cookies perl-HTTP-Daemon perl-HTTP-Message perl-HTTP-Negotiate perl-libwww-perl perl-LWP-Protocol-https perl-Module-ScanDeps perl-Test-Requires perl-Test-TCP perl-WWW-Curl perl-XML-LibXML perl-XML-Parser perl-XML-SAX perl-XML-SAX-Base solves this issue -- WBR, Dmitriy Stremkovskiy.
Download (untitled) / with headers
text/plain 715b
On Tue Jul 30 13:36:10 2013, d.stremkovskiy@corp.mail.ru wrote: Show quoted text
> Hm-m, looks like i forgot to install some other deps. > Installftion of: > perl-Crypt-SSLeay > perl-HTTP-Body > perl-HTTP-Cookies > perl-HTTP-Daemon > perl-HTTP-Message > perl-HTTP-Negotiate > perl-libwww-perl > perl-LWP-Protocol-https > perl-Module-ScanDeps > perl-Test-Requires > perl-Test-TCP > perl-WWW-Curl > perl-XML-LibXML > perl-XML-Parser > perl-XML-SAX > perl-XML-SAX-Base > solves this issue
Is this definitely the case? I am also seeing this within the Debian package build system, and I suspect it's more likely to be caused by hash randomisation. If you run the test a few times (with all the deps installed) do you still get this?
Download (untitled) / with headers
text/plain 467b
On 2013-08-19 19:37:46, DOM wrote: Show quoted text
> Is this definitely the case? I am also seeing this within the Debian > package build system, and I suspect it's more likely to be caused by > hash randomisation. If you run the test a few times (with all the deps > installed) do you still get this?
http://matrix.cpantesters.org/?dist=Net-Jabber shows both green and red for 5.17.x - 5.19.x, so a hash randomization problem is really a hot candidate here. Regards, Slaven
Download (untitled) / with headers
text/plain 126b
Sorting the hash before xml ecnoding it is one option to fix this problem. Patch attached. Cheers, gregor, Debian Perl Group
Subject: 40hash-randomisation.patch
Description: feed hash to RPCEncode_Value() sorted Origin: vendor Bug: https://rt.cpan.org/Public/Bug/Display.html?id=87436 Bug-Debian: https://bugs.debian.org/720271 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=87436 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2014-07-26 --- a/lib/Net/Jabber/Protocol.pm +++ b/lib/Net/Jabber/Protocol.pm @@ -2239,7 +2239,7 @@ elsif (ref($value) eq "HASH") { my $struct = $obj->AddValue()->AddStruct(); - foreach my $key (keys(%{$value})) + foreach my $key (sort keys(%{$value})) { $self->RPCEncode_Value($struct->AddMember(name=>$key),$value->{$key}); }
Download (untitled) / with headers
text/plain 177b
On 2014-07-26 13:45:35, GREGOA wrote: Show quoted text
> Sorting the hash before xml ecnoding it is one option to fix this > problem. Patch attached.
This patch fixes the issue for me. David


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.