On Sun Sep 23 06:52:22 2012, ANDK wrote:
Show quoted text> I found a new pattern regarding t/060_driver/memcached/serializer.t: if
> Data-MessagePack isn't installed, then the test is skipped, so we get a
> pass; if perl is unthreaded, then it works with all Data-MessagePack
> versions up to current 0.46; if perl is threaded, then the MessagePack
> version makes a difference: if it is 0.34 or lower, then the test in
> Data-Model works, regardless; if it is 0.36..0.46, then it fails.
>
> Sumarizing in a table, I hope it doesn't get distorted by RT:
>
> | | | =======perl========== |
> | | | threaded | unthreaded |
> | | | | |
> | message | 0.36-0.46 | FAIL | PASS |
> | pack | <=0.34 | PASS | PASS |
> | | missing | PASS | PASS |
>
> I have verified that this pattern holds with 22 different bleadperls. YMMV.
I had completely forgotten about this ticket. Y’know, this is probably the same issue as <
https://rt.perl.org/rt3/Ticket/Display.html?id=119771> which occurs because Data::MessagePack is behaving differently depending on a boolean read from uninitialized memory.
t/060_driver/memcached/serializer.t depends on Data::MessagePack’s sorting hashes when serialising them.
Data::MessagePack makes no guarantee that it will do that. What it actually does is random, depending on what order things are arranged in memory.
The attached patch makes sure that Data::MessagePack’s canonical option is used in the test, for the sake of comparing output.
Data::Model’s tests fail for me on Perl 5.19.4 (to be released tomorrow) without this patch, but pass with 5.18.1.