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.18.1 lcov report (development 29877-9124a6ce27) Lines: 636 693 91.8 %
Date: 2025-01-18 09:08:44 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
varlower 34
eval_mnemonic 35
bin_number_len 37
_lower 42
_higher 49
addhelp 50
gdive 56
hex_read 74
binary_read 102
strtobin_len 102
varhigher 105
hex_number_len 108
var_register 118
varentries_reset 118
vars_to_RgXV 175
real_0_digits 196
IS_ID 457
pari_is_default 965
pari_isbdigit 1064
gpolvar 1183
vars_sort_inplace 1211
gshift_right 1392
pari_var_close 1862
pari_var_init 1872
is_ulong 1884
_given_value 3010
real_read_more 4906
cmp_by_var 5150
pari_fill_hashtable 5606
varentries_set 9287
compile_str 10992
varstate_restore 12851
varentries_unset 16021
gsub1e 20965
ifpari_multi 31325
initep 35455
exponent 75537
real_read 85807
strtor 85807
fetch_var 86953
gmule 178691
pari_set_varstate 332562
var_restore 345411
fetch_user_var 449120
fetch_entry 449234
varstate_save 474138
pari_var_create 479605
is_long 520390
gadde 536517
readseq 803787
readseq_i 803787
dec_read_more 872763
dec_strtoi_len 872763
skipstring 880059
fetch_var_higher 1162563
delete_var 1249538
check_proto 2624514
isreturn 2624514
fill_hashtable_single 2648830
insertep 2684167
dec_number_len 3789864
is_entry 8093790
do_alias 9775513
fetch_entry_raw 10186784
int_read 11966533
strtoi 11966533
skipexponent 11968386
skipconstante 11970016
skipdigits 11975459
dec_read 12057144
number 12132681
ifpari 13077659
gsube 15455370
orpari 16723451
findentry 18281540
gadd1e 25685195
pari_lex 40570827
ifpari_void 41473086
ishex 50141303
isbin 50141359
andpari 64287451

Generated by: LCOV version 1.16