----- Original Message -----
> From: "Lance Richardson" <lrich...@redhat.com>
> To: dev@openvswitch.org
> Sent: Wednesday, March 2, 2016 4:40:44 PM
> Subject: [ovs-dev] [RFC 0/4] testsuite code coverage usability fixes, lcov
> 
> 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 *
> 
> 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.
> 
> 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
> 

If anyone would like to try this (and perhaps send a "Tested-by" :-)),
it's fairly straightforward.

The lcov package is required, so "yum install lcov", "apt-get install lcov",
etc. as appropriate for your system.  Then:

    git clone https://github.com/openvswitch/ovs.git ovs-test
    cd ovs-test/
    wget https://patchwork.ozlabs.org/patch/591138/raw/ -O - | patch -p1
    wget https://patchwork.ozlabs.org/patch/591139/raw/ -O - | patch -p1
    wget https://patchwork.ozlabs.org/patch/591140/raw/ -O - | patch -p1
    wget https://patchwork.ozlabs.org/patch/591141/raw/ -O - | patch -p1
    ./boot.sh
    ./configure --enable-coverage
    make check-lcov
    firefox tests/lcov/index.html

At this point the coverage data can be browsed using your favorite web
browser.

   Lance
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to