On Fri, Mar 24, 2017 at 8:12 AM, Rohan Rajak <rajakroha...@gmail.com> wrote:
> Hi Sir,
>
> I am not really understanding whether we are covering majority of strace
> code and kernel as well.
Well, covering the kernel code is not a target of the test suite. Test
suite is aimed to check that strace's behaviour is correct (in many
senses). Significant part of it checks decoders, and in terms of
decoder tests there are the following criterias:
 * All code paths should be covered. Unfortunately, current system
counts coverage independent of callee, thus if some utility function
is called at least once, it deemed covered. What is more important,
however, is that all relevant code (including common utility) has been
covered for each decoder, as it allows for checking all thecorner
cases specific to each decoder (for example, printstr_ex has a lot of
options and we should make sure that right options are called in right
cases and we are getting output we expected in regards to trimming,
ellipsis, quotes, escaping, etc).
 * As it is intended to make strace the debugging tool, it is aimed
that strace's output mimics the way kernel interprets incoming
arguments. It's quite difficult to formalise this properly, as it
boils down to the syscall code and its callees (for example, how uid
65535/4294967295 should be printed, if some syscalls interpret it as a
special value and others just as an invalid one; or how to interpret
ignored arguments). However, in term of testcase we at least
definitely know that we should at least cover this case and check that
it prints what we decide it should print.
 * As strace's output is for people, not machines, it can be shortened
and abbreviated in various ways. As it creates some variation and some
peculiarity to strace's output, all these cases should be covered too
(whether all hese shorthands are used only in case we expect it and
nowhere else).

> Also there is a difference of coverage on codecov
> site and on other systems I have tested, how would you suggest to solve that
> .

As noted in [1], some tests (and, to some extent, strace's behaviour)
are dependent on the version of kernel headers, libc, and kernel ABI
used for building strace or tests, respectively. thus the discrepancy.

[1] https://sourceforge.net/p/strace/mailman/message/35732562/

-- 
Eugene Syromyatnikov
mailto:evg...@gmail.com
xmpp:esyr@jabber.{ru|org}

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to