On 19.12.2018 2:40, Ben Pfaff wrote:
> On Tue, Dec 18, 2018 at 07:38:27PM +0300, Ilya Maximets wrote:
>> Current version is broken because it converts first argument to
>> integer and after that substracts the duoble value. At the end
>> the result converted to integer again.
>> This does not cause unit test failures because qsort on linux
>> accidentially makes right order. On FreeBSD this leads to the
>> test failure:
>>
>>   TEST '10-intervals-linear-growth'
>>   Assertion \
>>   '|(&stats)->pctl_95 - (&d->expected_stats)->pctl_95| < 1e-1' failed:
>>           |9 - 10| < 0.1
>>
>> CC: Mark Michelson <[email protected]>
>> Fixes: aed45befeff2 ("Add stopwatch timing API")
>> Signed-off-by: Ilya Maximets <[email protected]>
> 
> Thanks a lot for the fix!
> 
> I hope that you are not too irritated that I changed the code here to
> the form that I generally consider idiomatic for this kind of 3-way
> comparison:
> 
>     return *right_d > *left_d ? -1 : *right_d < *left_d;
> 
> With that change, I applied this to master.

Looks fine. Thanks.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to