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 - language - anal.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29419-8afb0ed749) Lines: 636 693 91.8 %
Date: 2024-07-02 09:03:41 Functions: 95 101 94.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
gp_read_str 0
gp_read_str_bitprec 0
gp_read_str_prec 0
name_var 0
pari_add_function 0
pari_var_next_temp 0
fetch_var_value 7
gdivente 7
gdivrounde 7
gmode 7
gshiftle 7
gshiftre 7
check_name 8
pari_var_next 8
kill0 18
killep 18
install 20
alias0 28
arity0 28
bin_read 28
eval_mnemonic 28
varlower 34
bin_number_len 37
_lower 42
_higher 49
addhelp 50
gdive 56
hex_read 74
varhigher 98
binary_read 102
strtobin_len 102
hex_number_len 108
var_register 111
varentries_reset 111
vars_to_RgXV 175
real_0_digits 196
IS_ID 380
pari_is_default 958
pari_isbdigit 1064
gpolvar 1183
vars_sort_inplace 1197
gshift_right 1392
pari_var_close 1841
pari_var_init 1851
is_ulong 1863
_given_value 2982
real_read_more 4920
cmp_by_var 5150
pari_fill_hashtable 5543
varentries_set 9056
compile_str 10992
varstate_restore 12354
varentries_unset 15468
gsub1e 20965
ifpari_multi 31325
initep 34405
exponent 75691
real_read 85933
strtor 85933
fetch_var 103161
gmule 178215
fetch_var_higher 285998
pari_set_varstate 322390
var_restore 334733
delete_var 385910
fetch_user_var 448847
fetch_entry 448961
varstate_save 459324
pari_var_create 478947
is_long 516403
gadde 534445
readseq 803787
readseq_i 803787
dec_read_more 872690
dec_strtoi_len 872690
skipstring 879597
check_proto 2576552
isreturn 2576552
fill_hashtable_single 2600595
insertep 2634889
dec_number_len 3789689
is_entry 8022996
do_alias 9724994
fetch_entry_raw 10137896
int_read 11956015
strtoi 11956015
skipexponent 11957879
skipconstante 11959362
skipdigits 11964840
dec_read 12046766
number 12122457
ifpari 13075703
gsube 15455370
orpari 16719573
findentry 18161860
gadd1e 25685195
pari_lex 40483264
ifpari_void 41469798
ishex 50072111
isbin 50072167
andpari 64281172

Generated by: LCOV version 1.16