[ovs-dev] [RFC 0/4] testsuite code coverage usability fixes, lcov

Aaron Conole aconole at redhat.com
Wed Mar 2 22:40:32 UTC 2016


Lance Richardson <lrichard at redhat.com> writes:

> This series addresses usability issues when executing the testsuite
> on builds configured with --enable-coverage and introduces basic
> support for generating HTML code coverage reports via lcov.
>
> Currently when running "make check" on a build with coverage enabled,
> nearly all test cases will fail due to unexpected messages on stderr
> of the form:
>     profiling:...*.gcda: Merge mismatch for function *

It's important to note that this could happen for legitimate reasons as
well; I've submitted a patch for gcov to eliminate the need for a regex
added to each test case.

> This happens because daemons created for each test case are killed
> at the end of the test case, and if a daemon happens to be killed
> while in the middle of writing coverage information to a gcda file,
> the gcda file will be corrupted.

But, this is still an issue, and one I'm going to put on my list of
things to-do (because gcov should sortof recover from this anyway -
after all something bad could happen during execution).

> These errors can be avoided by ensuring that deamons have fully
> exited when given the "exit" command before executing any cleanup
> actions.
>
> Lance Richardson (4):
>   tests: Make OVS_APP_EXIT_AND_WAIT() wait for process termination
>   tests: make as() function as documented
>   tests: consistently use OVS_APP_EXIT_AND_WAIT() for daemon termination
>   tests: enable basic lcov code coverage reporting support
>
>  .gitignore                     |  1 +
>  INSTALL.md                     |  6 +++
>  tests/automake.mk              | 17 ++++++++
>  tests/bridge.at                |  2 +
>  tests/completion.at            |  2 +-
>  tests/daemon.at                |  2 +-
>  tests/interface-reconfigure.at |  2 +
>  tests/ofproto-dpif.at          | 77 ++++++++++++++++++------------------
>  tests/ofproto-macros.at        |  6 +--
>  tests/ofproto.at               | 68 ++++++++++++++++----------------
>  tests/ovn-controller-vtep.at   | 12 +++---
>  tests/ovn-controller.at        | 15 ++++++-
>  tests/ovn-nbctl.at             |  2 +-
>  tests/ovn-sbctl.at             |  6 ++-
>  tests/ovn.at                   | 88 ++++++++++++++++++++++++++++++++++++++----
>  tests/ovs-macros.at            |  5 ++-
>  tests/ovs-vswitchd.at          |  8 ++--
>  tests/ovsdb-monitor.at         |  4 +-
>  tests/ovsdb-server.at          | 15 ++++---
>  tests/vlog.at                  |  6 ++-
>  20 files changed, 233 insertions(+), 111 deletions(-)

I very much approve this series. Not sure if you think it's complete
yet, but I'll be running it, because it does make a huge difference.



More information about the dev mailing list