[nanomsg] Re: Unit Test Failures in NanoMsg::Raw

  • From: James Hunt <james@xxxxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Thu, 30 Oct 2014 02:50:58 -0400

On 10/29/2014 11:33 PM, Matthew Hall wrote:
> Can anybody help with the errors in the Perl binding?

I'll take a crack at it.

> 
> On Sat, Oct 18, 2014 at 04:30:33PM -0700, Matthew Hall wrote:
>> I have been seeing these two failure for the past couple of months: In order 
>> to work around it I have to force-install the Perl module, but the module 
>> seems to work OK. Can somebody help me take a look into it and see what's 
>> going on? I'd like to see if it's reproducible and try to help you guys take 
>> care of it.
>>
>> Thanks,
>> Matthew.
>>
>> t/tcp.t ................... 1/?
>> #   Failed test at t/tcp.t line 30.
>> #          got: '1835218944'
>> #     expected: '0'
>>
>> #   Failed test at t/tcp.t line 36.
>> #          got: '1835219713'
>> #     expected: '1'

When I run these, the 'got' value changes with every run; looks like
large binary garbage (about 4 bytes worth).

>> t/tcp.t ................... 495/? # Looks like you failed 2 tests of 633.
>> t/tcp.t ................... Dubious, test returned 2 (wstat 512, 0x200)
>> Failed 2/633 subtests

The following patch seems to quell the errors:


diff --git a/Raw.xs b/Raw.xs
index 3d84c9b..77312ad 100644
--- a/Raw.xs
+++ b/Raw.xs
@@ -243,7 +243,7 @@ nn_getsockopt (s, level, option)
     int level
     int option
   PREINIT:
-    size_t optvallen;
+    size_t optvallen = 256;
     int ret;
   INIT:
     RETVAL = newSV(257);



Can you check and see if it does the same for you?

-jrh


Other related posts: