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 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.10.0 lcov report (development 21203-392a176) Lines: 640 719 89.0 %
Date: 2017-10-23 06:23:29 Functions: 98 100 98.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3129
_higher 49
_lower 42
addhelp 50
alias0 28
andpari 262269
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 8
check_proto 1765620
cmp_by_var 5073
compile_str 10108
dec_number_len 2997268
dec_read 8184628
dec_read_more 833310
dec_strtoi_len 833310
delete_var 69698
do_alias 6110999
eval_mnemonic 28
exponent 75418
fetch_entry 173340
fetch_entry_raw 6015761
fetch_user_var 173226
fetch_var 39600
fetch_var_higher 30160
fetch_var_value 7
fill_hashtable_single 1777916
findentry 6321891
gadd1e 17164266
gadde 2373646
gdive 56
gdivente 7
gdivrounde 7
gmode 7
gmule 80010
gp_read_str 0
gpolvar 728
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1777916
hashvalue_raw 6321891
hex_number_len 54
hex_read 28
ifpari 12822927
ifpari_multi 28126
ifpari_void 31388546
initep 25475
insertep 1803307
install 8
int_read 8100223
is_entry 304967
isbin 36639483
ishex 36639434
kill0 18
killep 18
name_var 252
number 8260046
orpari 16420110
pari_add_function 0
pari_fill_hashtable 4612
pari_is_default 1163
pari_isbdigit 1484
pari_lex 30158296
pari_pthread_init_varstate 16579
pari_thread_init_varstate 119321
pari_var_close 1536
pari_var_create 22312
pari_var_init 1538
pari_var_next 260
pari_var_next_temp 133
readseq 4408
real_0_digits 168
real_read 82595
real_read_more 1866
skipconstante 7899899
skipdigits 7902150
skipexponent 7899169
skipstring 1178509
strntoGENstr 465451
strtoGENstr 364480
strtobin_len 56
strtoi 8100223
strtor 82595
type0 23409
var_register 84
var_restore 127140
varentries_reset 336
varentries_set 8298
varentries_unset 11262
varhigher 77
varlower 28
vars_sort_inplace 161
vars_to_RgXV 154
varstate_restore 7993
varstate_save 99560

Generated by: LCOV version 1.11