This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
GDB test coverage
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 8 Nov 2016 17:38:41 +0000
- Subject: GDB test coverage
- Authentication-results: sourceware.org; auth=none
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 (齐尧)