Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - gp - gp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29115-f22e516b23) Lines: 300 360 83.3 %
Date: 2024-03-29 08:06:26 Functions: 27 31 87.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
break_loop 63
break_loop_prompt 126
dbg_down 7
dbg_err 7
dbg_up 14
free_trivial_stack 4
gp_ask_confirm 0
gp_err_recover 12592
gp_head 2
gp_main_loop 1820
gp_output 57677
gp_pre_recover 12154
gp_quit 1820
init_test 1783
init_trivial_stack 4
is_interactive 1933
is_silent 85331
main 1830
normal_output 4
pari_breakpoint 7
print_shortversion 2
read_arg 0
read_arg_equal 0
read_main 0
read_opt 1830
record_default 6
reset_ctrlc 132626
test_is_interactive 247271
test_output 57673
usage 2
whatnow0 35

Generated by: LCOV version 1.14