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 20916-a74d914) Lines: 639 718 89.0 %
Date: 2017-08-18 06:23:59 Functions: 98 100 98.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3122
_higher 49
_lower 42
addhelp 50
alias0 28
andpari 235788
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 8
check_proto 1699817
cmp_by_var 5073
compile_str 10108
dec_number_len 2996763
dec_read 7750889
dec_read_more 832997
dec_strtoi_len 832997
delete_var 66327
do_alias 5642555
eval_mnemonic 28
exponent 75418
fetch_entry 173254
fetch_entry_raw 5736795
fetch_user_var 173140
fetch_var 38768
fetch_var_higher 30064
fetch_var_value 7
fill_hashtable_single 1711769
findentry 5823638
gadd1e 17164266
gadde 2373645
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 1711769
hashvalue_raw 5823638
hex_number_len 54
hex_read 28
ifpari 12800636
ifpari_multi 43050
ifpari_void 31024760
initep 24220
insertep 1735905
install 8
int_read 7666470
is_entry 85799
isbin 34574324
ishex 34574275
kill0 18
killep 18
name_var 252
number 7826307
orpari 16432360
pari_add_function 0
pari_fill_hashtable 4484
pari_is_default 1044
pari_isbdigit 1484
pari_lex 28443744
pari_pthread_init_varstate 4610
pari_thread_init_varstate 31652
pari_var_close 1494
pari_var_create 21680
pari_var_init 1495
pari_var_next 260
pari_var_next_temp 133
readseq 4394
real_0_digits 168
real_read 82616
real_read_more 1859
skipconstante 7466249
skipdigits 7468584
skipexponent 7465533
skipstring 1106465
strntoGENstr 207125
strtoGENstr 108009
strtobin_len 56
strtoi 7666470
strtor 82616
type0 23325
var_register 84
var_restore 39490
varentries_reset 336
varentries_set 8142
varentries_unset 11178
varhigher 77
varlower 28
vars_sort_inplace 161
vars_to_RgXV 154
varstate_restore 7909
varstate_save 85694

Generated by: LCOV version 1.11