[ovs-git] [openvswitch/ovs] ea2b62: stopwatch: Fix qsort comparison function.

GitHub noreply at github.com
Tue Dec 18 23:43:48 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: ea2b62239f282ac9dc75fd498d96c36638eb4300
      https://github.com/openvswitch/ovs/commit/ea2b62239f282ac9dc75fd498d96c36638eb4300
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-12-18 (Tue, 18 Dec 2018)

  Changed paths:
    M lib/stopwatch.c

  Log Message:
  -----------
  stopwatch: Fix qsort comparison function.

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 <mmichels at redhat.com>
Acked-by: Mark Michelson <mmichels at redhat.com>
Fixes: aed45befeff2 ("Add stopwatch timing API")
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 20be3a7294ed6abe99a8e0f6f9fbe3c7d2dd8c10
      https://github.com/openvswitch/ovs/commit/20be3a7294ed6abe99a8e0f6f9fbe3c7d2dd8c10
  Author: Ilya Maximets <i.maximets at samsung.com>
  Date:   2018-12-18 (Tue, 18 Dec 2018)

  Changed paths:
    M tests/ovn.at

  Log Message:
  -----------
  ovn.at: Drop bash specific 'function' keyword.

This keyword is not portable and also optional in bash.
Fixes test on FreeBSD.

CC: Miguel Angel Ajo <majopela at redhat.com>
Fixes: 508b7f961bd6 ("ovn: l3ha, make is_chassis_active aware of gateway_chassis")
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/fe07df8026c6...20be3a7294ed
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the git mailing list