[PATCH v1] Test for HDIO_GETGEO
Eugene Syromiatnikov
esyr at redhat.com
Thu Mar 26 05:04:57 UTC 2020
On Wed, Mar 25, 2020 at 07:59:53PM +0530, Bran S wrote:
> On Wed, 25 Mar 2020 at 19:54, Bran S <archsbran at gmail.com> wrote:
> >
> > > What's the test coverage of this test?
> >
> >
> > I am still trying to build strace with LCOV. But I get errors while
> > doing `make code-coverage-capture`
> > Please see https://lists.strace.io/pipermail/strace-devel/2020-March/009506.html.
> > Is there any other way to calculate coverage of a test ?
> > Thanks
>
> So I ran coverage on another spare system and got the below result for
> strace/hdio.c
>
> Lines: 8/13 61.5 %
> Functions: 1/3 33.3 %
> Branches: 4/6 66.7 %
It seems that the test doesn't cover the actual decoder code, you can
try to address it with success-injection-based testing, [1] (or any
other *-success test) may be of use as an example of doing so.
[1] https://gitlab.com/strace/strace/commit/bd19a4d271e5
More information about the Strace-devel
mailing list