On Mon, Feb 15, 2016 at 7:38 PM, Satoshi KOBAYASHI <[email protected]>
wrote:

> Hi Corey,
>
> 2016/02/16 0:54、Corey Bryant <[email protected]> のメール:
>
>
>
> On Mon, Feb 15, 2016 at 2:13 AM, Minoru TAKAHASHI <
> [email protected]> wrote:
>
>> Hi, Corey
>>
>> On 2016年02月13日 07:17, Corey Bryant wrote:
>> > Hi,
>> >
>> > Has anyone come across this test failure?  I'm seeing it on an i386 run.
>> >
>> > ======================================================================
>> > FAIL: test_parser
>> (ryu.tests.unit.ofproto.test_ofproto_parser.TestMsgBase)
>> > ----------------------------------------------------------------------
>> > Traceback (most recent call last):
>> >   File "/«PKGBUILDDIR»/ryu/tests/unit/ofproto/test_ofproto_parser.py",
>> line 204, in test_parser
>> >     ok_(self._test_parser())
>> >   File "/«PKGBUILDDIR»/ryu/tests/unit/ofproto/test_ofproto_parser.py",
>> line 199, in _test_parser
>> >     eq_(hex(xid), check['xid'])
>> > AssertionError: '0x822c6866L' != '2183948390'
>>
>> Thank you for your report.
>> I think it maybe a bug in Ryu.
>>
>> The value of xid(2183948390) in the above test is larger than 2147483647.
>> (With my understanding, 2147483647(=2^31-1) is the maximum positive
>> value on 32bit plat-form.)
>> So, the insinstance(x, int) returns "False".
>>
>> If it is possible, please try the following steps to resolve the issue.
>>
>> 1) Correct ryu/ofproto/ofproto_parser.py as follows
>>
>>     def __str__(self):
>>         def hexify(x):
>> +            return hex(x) if x is not None else x
>> -            return hex(x) if isinstance(x, int) else x
>>         buf = 'version=%s,msg_type=%s,msg_len=%s,xid=%s,' %\
>>               (hexify(self.version), hexify(self.msg_type),
>>                hexify(self.msg_len), hexify(self.xid))
>>         return buf + StringifyMixin.__str__(self)
>>
>> 2) Reinstall Ryu
>>
>> 3) Execute 'run_test.sh' script
>>
>> thanks,
>>
>>
> Thanks, that fixed it up.  Btw, here's the current patch we're carrying in
> Ubuntu to fixup i386 failures.
>
> --- a/ryu/ofproto/oxx_fields.py
> +++ b/ryu/ofproto/oxx_fields.py
> @@ -82,7 +82,7 @@
>          name = f.name
>      except KeyError:
>          t = type_desc.UnknownType
> -        if isinstance(n, int):
> +        if isinstance(n, (int, long)):
>
>
> FYI.
> This line breaks down Python 3 compatibility because ‘long’ is removed in
> Python 3.
> I suggest using ‘six.integer_types'.
>
> if isinstance(n, six.integer_types):
>
>
Thanks I'll fix that up. I appreciate the advice.

>              name = 'field_%d' % (n,)
>          else:
>              raise KeyError('unknown %s field number: %s' % (oxx.upper(),
> n))
> --- a/ryu/tests/unit/packet/test_packet.py
> +++ b/ryu/tests/unit/packet/test_packet.py
> @@ -697,7 +697,7 @@
>          sctp_values = {'src_port': 1,
>                         'dst_port': 1,
>                         'vtag': 0,
> -                       'csum': p_sctp.csum,
> +                       'csum': repr(p_sctp.csum),
>                         'chunks': data_str}
>          _sctp_str = ','.join(['%s=%s' % (k, sctp_values[k])
>                               for k, _ in inspect.getmembers(p_sctp)
> @@ -1233,7 +1233,7 @@
>          sctp_values = {'src_port': 1,
>                         'dst_port': 1,
>                         'vtag': 0,
> -                       'csum': p_sctp.csum,
> +                       'csum': repr(p_sctp.csum),
>                         'chunks': data_str}
>          _sctp_str = ','.join(['%s=%s' % (k, sctp_values[k])
>                               for k, _ in inspect.getmembers(p_sctp)
> --- a/ryu/ofproto/ofproto_parser.py
> +++ b/ryu/ofproto/ofproto_parser.py
> @@ -170,7 +170,7 @@
>
>      def __str__(self):
>          def hexify(x):
> -            return hex(x) if isinstance(x, int) else x
> +            return hex(x) if x is not None else x
>          buf = 'version=%s,msg_type=%s,msg_len=%s,xid=%s,' %\
>                (hexify(self.version), hexify(self.msg_type),
>                 hexify(self.msg_len), hexify(self.xid))
>
> >
>> >
>> > --
>> > Regards,
>> > Corey
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> > Monitor end-to-end web transactions and take corrective actions now
>> > Troubleshoot faster and improve end-user experience. Signup Now!
>> > http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>> >
>> >
>> >
>> > _______________________________________________
>> > Ryu-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>> >
>>
>
>
>
> --
> Regards,
> Corey
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
>


-- 
Regards,
Corey
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to