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-bordeaux1.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 - init.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16912-212c0f0) Lines: 812 1154 70.4 %
Date: 2014-10-20 Functions: 93 128 72.7 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 414 763 54.3 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 83697010
cgetlist_avma 45
chk_gerepileupto 0
copy_bin 17623321
copy_bin_canon 20
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1030980325
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 3964
err_init_msg 3944
err_recover 3799
errname 4925
f_getheap 4890
fill_stack 0
fix_size 1882
gclone 48242336
gclone_refc 0
gcloneref 50
gcopy 418777619
gcopy_av0 335854238
gcopy_av0_canon 92
gcopy_avma 91081483
gcopy_lg 670
gerepile 214138068
gerepileallsp 10
gerepilecoeffssp 44181467
gerepilemanysp 3501973
getabstime 886
getheap 60
getstack 5
gettime 1706
getwalltime 0
gp_context_restore 3834
gp_context_save 33706
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 4890
gunclone 61803769
gunclone_deep 70468037
icopy_avma_canon 8
init_hashtable 0
init_universal_constants 886
list_internal_copy 280
listassign 280
listcopy 50
msgtimer 0
name_numerr 15
new_chunk_resize 1
newblock 48244037
numerr_name 4925
obj_check 1391281
obj_checkbuild 413430
obj_checkbuild_padicprec 180
obj_checkbuild_prec 3206
obj_free 1300
obj_init 740180
obj_insert 397702
obj_insert_shallow 721947
pari_add_defaults_module 886
pari_add_module 1772
pari_close 854
pari_close_blocks 854
pari_close_opts 854
pari_daemon 176
pari_err 14385
pari_err2GEN 14380
pari_err2str 9269
pari_err_display 3814
pari_err_last 21126
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 886
pari_init_defaults 886
pari_init_errcatch 961
pari_init_functions 886
pari_init_opts 886
pari_init_timer 886
pari_mainstack_alloc 957
pari_mainstack_free 925
pari_mainstack_malloc 957
pari_mainstack_mfree 925
pari_mainstack_mreset 27900
pari_mainstack_resize 71
pari_mainstack_use 886
pari_sig_init 1740
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 886
pari_thread_alloc 0
pari_thread_close 854
pari_thread_free 0
pari_thread_init 886
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 150
paristack_alloc 886
paristack_newrsize 75
paristack_resize 0
paristack_setsize 0
parivstack_reset 27900
parivstack_resize 0
pop_entree_block 12822
setdebugvar 0
shiftaddress 224182009
shiftaddress_canon 88
taille0 92
taille0_nolist 335854238
timer 0
timer2 0
timer_aux 26618
timer_delay 25732
timer_get 886
timer_printf 0
timer_start 212014
timer_vprintf 0
timetoi 0
trap0 15
traverseheap 60
type_dim 4340
words_to_allocate 139501448

Generated by: LCOV version 1.9