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 21741-70cf009) Lines: 625 719 86.9 %
Date: 2018-01-21 06:18:30 Functions: 96 100 96.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 42
alias0 28
andpari 268618
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 0
check_proto 1780256
cmp_by_var 5129
compile_str 10738
dec_number_len 2875978
dec_read 7716543
dec_read_more 786837
dec_strtoi_len 786837
delete_var 69474
do_alias 5864128
eval_mnemonic 28
exponent 75488
fetch_entry 384286
fetch_entry_raw 5997787
fetch_user_var 384188
fetch_var 40272
fetch_var_higher 29263
fetch_var_value 7
fill_hashtable_single 1796965
findentry 6269187
gadd1e 25675230
gadde 2373417
gdive 56
gdivente 7
gdivrounde 7
gmode 7
gmule 79934
gp_read_str 0
gpolvar 987
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1796965
hashvalue_raw 6269187
hex_number_len 54
hex_read 28
ifpari 12829940
ifpari_multi 31220
ifpari_void 39909495
initep 25818
insertep 1822699
install 0
int_read 7631886
is_entry 270236
isbin 34612026
ishex 34611977
kill0 14
killep 14
name_var 252
number 7792031
orpari 16420089
pari_add_function 0
pari_fill_hashtable 4555
pari_is_default 1164
pari_isbdigit 1484
pari_lex 28548397
pari_pthread_init_varstate 10278
pari_thread_init_varstate 86159
pari_var_close 1517
pari_var_create 22421
pari_var_init 1519
pari_var_next 252
pari_var_next_temp 147
readseq 4382
real_0_digits 168
real_read 82805
real_read_more 1908
skipconstante 7482801
skipdigits 7485199
skipexponent 7481993
skipstring 1106972
strntoGENstr 438785
strtoGENstr 333321
strtobin_len 56
strtoi 7631886
strtor 82805
type0 23388
var_register 84
var_restore 93628
varentries_reset 336
varentries_set 8288
varentries_unset 11563
varhigher 77
varlower 28
vars_sort_inplace 812
vars_to_RgXV 154
varstate_restore 8294
varstate_save 97253

Generated by: LCOV version 1.11