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 20091-343fe20) Lines: 623 718 86.8 %
Date: 2017-01-20 05:50:06 Functions: 96 100 96.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_given_value 3077
_higher 49
_lower 42
addhelp 42
alias0 28
andpari 180124
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 0
check_proto 1452128
cmp_by_var 5059
compile_str 10108
dec_number_len 2812258
dec_read 7624447
dec_read_more 751871
dec_strtoi_len 751871
delete_var 106899
do_alias 5563266
eval_mnemonic 1584
exponent 75404
fetch_entry 2896
fetch_entry_raw 5498528
fetch_user_var 2798
fetch_var 37674
fetch_var_higher 69287
fetch_var_value 7
fill_hashtable_single 1463320
findentry 5573313
gadd1e 3164266
gadde 2373417
gdive 35
gdivente 7
gdivrounde 7
gmode 7
gmule 79934
gp_read_str 0
gpolvar 728
gshift_right 1392
gshiftle 7
gshiftre 7
gsub1e 14
gsube 15171541
hashvalue 1463320
hashvalue_raw 5573313
hex_number_len 54
hex_read 28
ifpari 12910768
ifpari_multi 74452
ifpari_void 16815540
initep 22264
insertep 1485514
install 0
int_read 7539698
is_entry 73821
isbin 34307470
ishex 34307421
kill0 14
killep 14
name_var 252
number 7699851
orpari 2480947
pari_add_function 0
pari_fill_hashtable 5594
pari_is_default 964
pari_isbdigit 1484
pari_lex 28297807
pari_pthread_init_varstate 3929
pari_thread_init_varstate 61670
pari_var_close 1906
pari_var_create 14282
pari_var_init 1399
pari_var_next 252
pari_var_next_temp 126
readseq 3675
real_0_digits 168
real_read 82732
real_read_more 2073
skipconstante 7422992
skipdigits 7425254
skipexponent 7422345
skipstring 1108140
strntoGENstr 217913
strtoGENstr 117116
strtobin_len 56
strtoi 7539698
strtor 82732
type0 23164
var_register 70
var_restore 77792
varentries_reset 322
varentries_set 7688
varentries_unset 19582
varhigher 63
varlower 28
vars_sort_inplace 147
vars_to_RgXV 147
varstate_restore 16379
varstate_save 88956

Generated by: LCOV version 1.11