Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* GDB test coverage
@ 2016-11-08 17:38 Yao Qi
  2016-11-08 18:34 ` Matt Rice
  0 siblings, 1 reply; 2+ messages in thread
From: Yao Qi @ 2016-11-08 17:38 UTC (permalink / raw)
  To: gdb-patches

Hi,
We had the doc on wiki about doing coverage tests to GDB,
https://sourceware.org/gdb/wiki/TestingGDB#Coverage_Testing
and I give it a try last week.  Get some interesting results to share
now,

http://people.linaro.org/~yao.qi/gdb/coverage/20161102/

In general, the coverage is better than I expected :-).  Some initial
analysis to the coverage data,

 - the coverage in linux-record.c is low, because we don't test many
   syscalls in gdb.reverse,
 - the coverage in *-lang.c is low.  Looks we are still lack of language
   related tests.
 - we don't test all the start options in gdb, see the coverage in
   main.c:captured_main_1
 - we don't test "set cp-abi", "set extension-language", "delete checkpoint"
   "detach checkpopint",
 - here is a list of functions are never used,
   main.c:get_gdb_program_name,
   corefile.c:read_stack,
   valarith.c:value_in,
 - linux_gdb_signal_from_target and linux_gdb_signal_to_target are not
   well covered,

I am sure we can still get more from these coverage results.  How do we
make full use of coverage tests?  What I can think of are
 - we can find some never-used functions, and remove some of them,
 - add more test cases to address some low-coverage areas,

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GDB test coverage
  2016-11-08 17:38 GDB test coverage Yao Qi
@ 2016-11-08 18:34 ` Matt Rice
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Rice @ 2016-11-08 18:34 UTC (permalink / raw)
  To: Yao Qi; +Cc: gdb-patches

On Tue, Nov 8, 2016 at 9:38 AM, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> I am sure we can still get more from these coverage results.  How do we
> make full use of coverage tests?  What I can think of are
>  - we can find some never-used functions, and remove some of them,
>  - add more test cases to address some low-coverage areas,

A while back I would run a per-commit coverage under something like
the build bot, and commit the results to a git repository, (one of the
output formats of gcov does compress fairly well...)

One thing that I noticed was that coverage would swing fairly wildly
(even when running the coverage under the same checkout of a commit
without changes) due to the races in the testsuite.

I'm not sure if that would still be the case or not, this made it
fairly difficult to isolate the particular effect that any given
commit had on the coverage.
which I thought would have made a nice barometer of sorta...


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-08 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 17:38 GDB test coverage Yao Qi
2016-11-08 18:34 ` Matt Rice

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox