develooper Front page | perl.perl5.porters | Postings from March 2013

Re: [perl #117239] Bleadperl v5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz

Thread Previous | Thread Next
From:
demerphq
Date:
March 23, 2013 18:22
Subject:
Re: [perl #117239] Bleadperl v5.17.9-200-g0e0ab62 breaks MLEHMANN/JSON-XS-2.33.tar.gz
Message ID:
CANgJU+Vuh2aEhc20q3aki+kJYLga3vpqtS_vuFiQWP1_mYAnMg@mail.gmail.com
On 21 March 2013 06:42, Andreas J. Koenig via RT
<perlbug-followup@perl.org> wrote:
> # New Ticket Created by  (Andreas J. Koenig)
> # Please include the string:  [perl #117239]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117239 >
>
>
> git bisect
> ----------
> commit 0e0ab62106f892a1b7f00ad117493064bf9d72d1
> Author: Yves Orton <demerphq@gmail.com>
> Date:   Sun Mar 17 20:19:09 2013 +0100
>
>     Harden hashes against hash seed discovery by randomizing hash iteration
>
> sample fail report
> ------------------
> http://www.cpantesters.org/cpan/report/48924bc0-9027-11e2-869e-dc2c3b384401
>
> The test failing:
>
> t/19_incr.t           (Wstat: 12288 Tests: 697 Failed: 48)
>   Failed tests:  8, 11, 14, 17, 20, 29, 35, 38, 41, 44, 53
>                 56, 68, 71, 89, 95, 101, 104, 113, 122
>                 137, 140, 146, 152, 158, 164, 167, 170
>                 176, 179, 182, 185, 188, 194, 197, 200
>                 203, 206, 212, 233, 260, 263, 266, 269
>                 275, 284, 287, 290
>   Non-zero exit status: 48
>
> The line it reports in the diagnostics:
>
> https://metacpan.org/source/MLEHMANN/JSON-XS-2.33/t/19_incr.t#L22
>
> When the test is running twice, then the reported fails are usually
> different ones.

A patch to fix this can be found in:

https://rt.cpan.org/Public/Bug/Display.html?id=84151

Which is the equivalent of:

diff --git a/t/19_incr.t b/t/19_incr.t
index 119a80a..2ff7ce0 100644
--- a/t/19_incr.t
+++ b/t/19_incr.t
@@ -24,8 +24,8 @@ sub splitter {
    }
 }

-splitter +JSON::XS->new              , '
["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]';
-splitter +JSON::XS->new              , '[ "x\\"","\\u1000\\\\n\\nx" ,
1,{"\\\\ " :5 , "": " x"} ] ';
+splitter +JSON::XS->new->canonical(1), '
["x\\"","\\u1000\\\\n\\nx",1,{"\\\\" :5 , "": "x"}]';
+splitter +JSON::XS->new->canonical(1), '[ "x\\"","\\u1000\\\\n\\nx" ,
1,{"\\\\ " :5 , "": " x"} ] ';
 splitter +JSON::XS->new->allow_nonref, '"test"';
 splitter +JSON::XS->new->allow_nonref, ' "5" ';

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About