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 - init.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 21350-3349c1d) Lines: 878 1183 74.2 %
Date: 2017-11-21 06:21:18 Functions: 108 134 80.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
chk_gerepileupto 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
fill_stack 0
gclone_refc 0
getdebugvar 0
msgtimer 0
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_sighandler 0
pari_sigint 0
pari_thread_valloc 0
paristack_resize 0
paristack_setsize 0
parivstack_resize 0
setdebugvar 0
timer 0
timer2 0
timer_printf 0
timer_vprintf 0
getstack 7
new_chunk_resize 7
pari_version 7
getwalltime 8
timetoi 8
copy_bin_canon 12
icopy_avma_canon 12
shiftaddress_canon 20
name_numerr 21
trap0 21
gcopy_av0_canon 28
obj_reinit 28
taille0_canon 28
pari_daemon 60
getheap 84
traverseheap 84
cgetlist_avma 133
gsizebyte 147
listcopy 215
pari_mainstack_resize 257
paristack_newrsize 263
obj_checkbuild_padicprec 455
pari_warn 515
gcopy_lg 588
list_internal_copy 698
listassign 698
pari_add_module 1536
pari_close 1536
pari_close_opts 1536
init_universal_constants 1538
pari_add_defaults_module 1538
pari_init_defaults 1538
pari_init_functions 1538
pari_init_opts 1538
pari_init_timer 1538
pari_stackcheck_init 1538
paristack_alloc 1538
getabstime 1550
timer_get 1556
gdisplay 2282
gettime 3018
pari_sig_init 3074
type_dim 6258
f_getheap 6699
gsizeword 6846
err_recover 8147
pari_err_display 8168
gp_context_restore 8217
err_init_msg 8648
err_init 8683
obj_free 9191
obj_checkbuild_realprec 11243
pari_thread_sync 11790
pari_err2str 15343
os_signal 16906
errname 26346
numerr_name 26346
obj_checkbuild_prec 34826
pari_err2GEN 42124
pari_err 42140
gcloneref 50420
timer_delay 65057
timer_aux 66613
pari_err_last 67932
parivstack_reset 70442
gp_context_save 85382
pari_thread_start 90743
pari_thread_alloc 91600
pari_thread_free 91600
pari_init_blocks 92290
pari_mainstack_use 92344
pari_init_errcatch 92542
pari_close_blocks 92574
pari_thread_init 92720
pari_thread_close 92931
pari_mainstack_free 93393
pari_mainstack_mfree 93393
pari_mainstack_alloc 93395
pari_mainstack_malloc 93395
pop_entree_block 144682
pari_mainstack_mextend 163837
pari_mainstack_mreset 163837
pari_mainstack_setsize 163837
fix_size 186788
gerepileallsp 189367
timer_start 499611
obj_checkbuild 744248
obj_insert 1100583
obj_insert_shallow 1104433
obj_init 1858381
obj_check 2430298
gerepilemanysp 5491260
copy_bin 47673868
gerepilecoeffssp 119041542
gclone 183183197
gsizeclone 183190021
newblock 183408940
gunclone 226285120
cgetg_copy_avma 280394671
gerepile 429818046
shiftaddress 689247858
gcopy_av0 984899679
taille0 984906825
dec_gerepile 1947072034
gcopy_avma 2683793142
gunclone_deep 2714456485
gsizeclone_i 2744315368
gcopy 3258084269

Generated by: LCOV version 1.11