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.8.0 lcov report (development 19619-c9e92b8) Lines: 638 718 88.9 %
Date: 2016-09-29 05:54:10 Functions: 98 100 98.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3035
_higher 49
_lower 42
addhelp 49
alias0 28
andpari 175651
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 7
check_proto 1368873
cmp_by_var 5059
compile_str 10108
dec_number_len 2812547
dec_read 7615851
dec_read_more 751989
dec_strtoi_len 751989
delete_var 107001
do_alias 5624862
eval_mnemonic 1584
exponent 75299
fetch_entry 2812
fetch_entry_raw 5475148
fetch_user_var 2700
fetch_var 39349
fetch_var_higher 67754
fetch_var_value 7
fill_hashtable_single 1378316
findentry 5635204
gadd1e 3163195
gadde 2373417
gdive 35
gdivente 7
gdivrounde 7
gmode 7
gmule 91134
gp_read_str 0
gpolvar 728
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1378316
hashvalue_raw 5635204
hex_number_len 54
hex_read 28
ifpari 12903677
ifpari_multi 74452
ifpari_void 16792373
initep 21690
insertep 1399936
install 7
int_read 7531256
is_entry 159141
isbin 34264252
ishex 34264203
kill0 21
killep 21
name_var 224
number 7691150
orpari 2480940
pari_add_function 0
pari_fill_hashtable 5398
pari_is_default 915
pari_isbdigit 1484
pari_lex 28250193
pari_pthread_init_varstate 12757
pari_thread_init_varstate 201868
pari_var_close 1857
pari_var_create 18965
pari_var_init 1350
pari_var_next 224
pari_var_next_temp 126
readseq 3675
real_0_digits 168
real_read 82599
real_read_more 2052
skipconstante 7414214
skipdigits 7416441
skipexponent 7413602
skipstring 1107895
strntoGENstr 296547
strtoGENstr 198557
strtobin_len 56
strtoi 7531256
strtor 82599
type0 23108
var_register 70
var_restore 217167
varentries_reset 294
varentries_set 7457
varentries_unset 19043
varhigher 63
varlower 28
vars_sort_inplace 147
vars_to_RgXV 147
varstate_restore 15889
varstate_save 94494

Generated by: LCOV version 1.11