Some thoughts about coding plan

Dmitry V. Levin ldv at altlinux.org
Thu May 10 02:07:17 UTC 2018


On Wed, May 09, 2018 at 01:02:52AM +0800, Zhibin Li wrote:
> Hi guys,
> 
> I've been doing research about testing stuff and trying to discover more
> about strace myself. As you guys mentioned on the website, branches of
> parsers are way far from being covered so I think I'd better start with
> coding for branches coverage. More specifically, I've got some basic
> knowledge about the metric of branch coverage and besides, I noticed that
> there is an option "--enable-code-coverage" which is based on gcov and lcov
> and shows line/function/branch coverage in number/percent.
> I think I could use this coverage report as my guidance and strart to code
> for those branches which are not yet covered. For example, fcntl parser has
> a lot of options and flags in the switch...case segment that need coverage

Yes, fcntl.c is poorly covered with tests yet.
Another somewhat similar example is net.c

> and of course other parsers may be not like it, e.g. more if else
> condition. To become more familiar with these syscalls I think manual pages
> will help a lot. I can refer to the categories and usages in the manual
> considering there are part of syscalls I don't know about.
> Concerns: Dmitry said the kernel the test suite is running is relatively
> old but the branch coverage report generated by gcov is based on the kernel
> on my own desktop/laptop so there must be some differences. Should I just
> compile and install the older kernel and use some other platforms to figure
> it out?

No, you'd get better coverage with fresh kernels, so please use them instead.
The old kernel is used in travis ci because of a limitation of that environment.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180510/ffdf9636/attachment.bin>


More information about the Strace-devel mailing list