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.0 lcov report (development 29712-7c8a932571) Lines: 636 693 91.8 %
Date: 2024-11-15 09:08:45 Functions: 95 101 94.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
IS_ID 457
_given_value 3010
_higher 49
_lower 42
addhelp 50
alias0 28
andpari 64287451
arity0 28
bin_number_len 37
bin_read 28
binary_read 102
check_name 8
check_proto 2599312
cmp_by_var 5150
compile_str 10992
dec_number_len 3789830
dec_read 12054218
dec_read_more 872747
dec_strtoi_len 872747
delete_var 1248794
do_alias 9764117
eval_mnemonic 35
exponent 75691
fetch_entry 449024
fetch_entry_raw 10175493
fetch_user_var 448910
fetch_var 86901
fetch_var_higher 1161855
fetch_var_value 7
fill_hashtable_single 2623446
findentry 18250171
gadd1e 25685195
gadde 536517
gdive 56
gdivente 7
gdivrounde 7
gmode 7
gmule 178691
gp_read_str 0
gp_read_str_bitprec 0
gp_read_str_prec 0
gpolvar 1183
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 20965
gsube 15455370
hex_number_len 108
hex_read 74
ifpari 13077644
ifpari_multi 31325
ifpari_void 41473149
initep 35210
insertep 2658538
install 20
int_read 11963460
is_entry 8073715
is_long 516498
is_ulong 1870
isbin 50124321
ishex 50124265
isreturn 2599312
kill0 18
killep 18
name_var 0
number 12129909
orpari 16723451
pari_add_function 0
pari_fill_hashtable 5564
pari_is_default 965
pari_isbdigit 1064
pari_lex 40551129
pari_set_varstate 324307
pari_var_close 1848
pari_var_create 479122
pari_var_init 1858
pari_var_next 8
pari_var_next_temp 0
readseq 803787
readseq_i 803787
real_0_digits 196
real_read 85947
real_read_more 4913
skipconstante 11966985
skipdigits 11972477
skipexponent 11965362
skipstring 879975
strtobin_len 102
strtoi 11963460
strtor 85947
var_register 118
var_restore 337037
varentries_reset 118
varentries_set 9112
varentries_unset 15909
varhigher 105
varlower 34
vars_sort_inplace 1204
vars_to_RgXV 175
varstate_restore 12739
varstate_save 464964

Generated by: LCOV version 1.16