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 20777-d2a9243) Lines: 639 718 89.0 %
Date: 2017-06-25 05:59:24 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 218288
bin_number_len 38
bin_read 28
binary_read 56
chartoGENstr 56
check_name 8
check_proto 1671026
cmp_by_var 5073
compile_str 10108
dec_number_len 2996413
dec_read 7748151
dec_read_more 832885
dec_strtoi_len 832885
delete_var 63481
do_alias 5624713
eval_mnemonic 28
exponent 75404
fetch_entry 170874
fetch_entry_raw 5721626
fetch_user_var 170760
fetch_var 38453
fetch_var_higher 25089
fetch_var_value 7
fill_hashtable_single 1682922
findentry 5803262
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 1682922
hashvalue_raw 5803262
hex_number_len 54
hex_read 28
ifpari 12800628
ifpari_multi 43050
ifpari_void 30905745
initep 23856
insertep 1706708
install 8
int_read 7663746
is_entry 80599
isbin 34556417
ishex 34556368
kill0 18
killep 18
name_var 252
number 7823555
orpari 16407853
pari_add_function 0
pari_fill_hashtable 4463
pari_is_default 1037
pari_isbdigit 1484
pari_lex 28421015
pari_pthread_init_varstate 4294
pari_thread_init_varstate 30068
pari_var_close 1487
pari_var_create 21302
pari_var_init 1488
pari_var_next 260
pari_var_next_temp 126
readseq 4394
real_0_digits 168
real_read 82602
real_read_more 1859
skipconstante 7463547
skipdigits 7465868
skipexponent 7462852
skipstring 1106367
strntoGENstr 201190
strtoGENstr 103215
strtobin_len 56
strtoi 7663746
strtor 82602
type0 23318
var_register 70
var_restore 37727
varentries_reset 322
varentries_set 8072
varentries_unset 11073
varhigher 63
varlower 28
vars_sort_inplace 161
vars_to_RgXV 154
varstate_restore 7825
varstate_save 84251

Generated by: LCOV version 1.11