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.18.0 lcov report (development 29712-7c8a932571) Lines: 277 334 82.9 %
Date: 2024-11-15 09:08:45 Functions: 24 28 85.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
gp_ask_confirm 0
read_arg 0
read_arg_equal 0
read_main 0
gp_head 2
print_shortversion 2
usage 2
free_trivial_stack 4
init_trivial_stack 4
record_default 6
dbg_down 7
dbg_err 7
dbg_up 14
whatnow0 35
break_loop 63
break_loop_prompt 126
init_test 1811
gp_main_loop 1848
gp_quit 1848
main 1858
read_opt 1858
is_interactive 1961
gp_pre_recover 12664
gp_err_recover 13123
test_output 59291
is_silent 88965
reset_ctrlc 138128
test_is_interactive 257435

Generated by: LCOV version 1.16