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 to exceed 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.12.0 lcov report (development 23017-8c5e72c46) Lines: 832 1193 69.7 %
Date: 2018-09-23 05:39:13 Functions: 101 135 74.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
chk_gerepileupto 0
copy_bin_canon 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
gcopy_av0_canon 0
getdebugvar 0
getwalltime 0
icopy_avma_canon 0
listinit 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
shiftaddress_canon 0
taille0_canon 0
timer 0
timer2 0
timer_printf 0
timer_vprintf 0
timetoi 0
getstack 7
new_chunk_resize 7
pari_version 7
name_numerr 21
trap0 21
obj_reinit 35
pari_daemon 60
getheap 84
traverseheap 84
cgetlist_avma 133
gsizebyte 147
gsizeword 147
listcopy 207
pari_mainstack_resize 278
paristack_newrsize 284
obj_checkbuild_padicprec 497
pari_warn 543
gcopy_lg 588
list_internal_copy 697
listassign 697
pari_add_module 1542
pari_close 1542
pari_close_opts 1542
getabstime 1552
init_universal_constants 1552
pari_add_defaults_module 1552
pari_init_defaults 1552
pari_init_functions 1552
pari_init_opts 1552
pari_init_timer 1552
pari_stackcheck_init 1552
paristack_alloc 1552
timer_get 1554
gdisplay 2359
gettime 3050
pari_sig_init 3094
type_dim 6384
f_getheap 6762
err_recover 8821
pari_err_display 8842
gp_context_restore 8889
err_init_msg 9320
err_init 9385
pari_thread_sync 11139
obj_free 11886
obj_checkbuild_realprec 12013
pari_err2str 16099
os_signal 17012
errname 26947
numerr_name 26947
pari_err2GEN 43520
pari_err 43536
gcloneref 50859
pari_err_last 69373
timer_delay 73323
timer_aux 74877
parivstack_reset 79369
obj_checkbuild_prec 83448
gp_context_save 95670
pari_thread_start 111431
pari_close_blocks 111736
pari_thread_alloc 112351
pari_thread_free 112351
pari_mainstack_use 112954
pari_thread_close 112963
pari_init_blocks 113281
pari_thread_init 113425
pari_init_errcatch 113499
pari_mainstack_free 114171
pari_mainstack_mfree 114171
pari_mainstack_alloc 114181
pari_mainstack_malloc 114181
pop_entree_block 171380
gerepileallsp 186852
pari_mainstack_mextend 193550
pari_mainstack_mreset 193550
pari_mainstack_setsize 193550
fix_size 228352
timer_start 229619
obj_checkbuild 851412
obj_insert 1126708
obj_insert_shallow 1130803
obj_init 1208528
obj_check 2615687
gerepilemanysp 5870417
copy_bin 57043607
gerepilecoeffssp 131370334
gclone 212102152
gsizeclone 212102299
newblock 212369598
gunclone 246764393
cgetg_copy_avma 349026701
gerepile 482511494
shiftaddress 794988462
gcopy_av0 1135072931
taille0 1135074691
dec_gerepile 2120881296
gcopy_avma 2826245049
gsizeclone_i 2895704451
gunclone_deep 2932170276
gcopy 3305503113

Generated by: LCOV version 1.13