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.16.1 lcov report (development 28676-df828f1c94) Lines: 1155 1493 77.4 %
Date: 2023-08-26 07:54:43 Functions: 134 162 82.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
chk_gerepileupto 0
dbg_fill_stack 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
gclone_refc 0
getdebugvar 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
timer 0
timer2 0
timer_printf 0
timer_vprintf 0
walltimer_get 0
exportall 6
unexportall 6
getstack 7
pari_version 7
getwalltime 8
timetoi 8
icopy_avma_canon 12
new_chunk_resize 14
copy_bin_canon 16
name_numerr 21
trap0 21
export_del 24
shiftaddress_canon 24
gcopy_av0_canon 32
taille0_canon 32
obj_reinit 35
export_add 59
pari_daemon 76
getheap 84
traverseheap 84
setdebug 127
gsizebyte 154
pari_mainstack_resize 378
paristack_newrsize 385
cgetlist_avma 480
obj_checkbuild_padicprec 546
listcopy 590
pari_warn 693
gcopy_lg 742
export_get 1499
pari_add_module 1799
pari_close 1799
pari_close_export 1799
pari_close_opts 1799
init_universal_constants 1809
pari_add_defaults_module 1809
pari_init_defaults 1809
pari_init_export 1809
pari_init_functions 1809
pari_init_opts 1809
pari_init_timer 1809
paristack_alloc 1809
getabstime 1821
timer_get 1827
setalldebug 1837
gdisplay 2541
gettime 3536
pari_sig_init 3608
list_internal_copy 6410
listassign 6410
f_getheap 6664
type_dim 7266
err_recover 11978
pari_err_display 11999
gp_context_restore 12053
err_init_msg 12580
err_init 12692
traverseheap_r 13412
obj_free 15679
pari_err2str 19692
os_signal 19839
errname 26899
numerr_name 26899
gcloneref 37720
pari_err2GEN 47354
pari_err 47373
obj_checkbuild_realprec 65365
obj_insert_shallow 68138
pari_err_last 70726
walltimer_delay 98045
timer_delay 101581
parivstack_reset 110399
gp_context_save 132828
obj_checkbuild_prec 170623
timer_aux 201453
rndus 201461
walltimer_start 230279
pop_entree_block 303611
pari_close_blocks 310132
pari_thread_set_global 313753
pari_thread_start 314114
pari_thread_alloc 314361
pari_thread_free 314361
pari_thread_get_global 314361
pari_thread_close 314787
pari_thread_init 315843
pari_mainstack_use 315902
pari_init_blocks 315936
pari_init_errcatch 316178
pari_mainstack_free 316538
pari_mainstack_mfree 316538
pari_mainstack_alloc 316548
pari_mainstack_malloc 316548
pari_stackcheck_init 317620
timer_start 334326
pari_mainstack_mextend 426947
pari_mainstack_mreset 426947
pari_mainstack_setsize 426947
fix_size 633086
obj_checkbuild 810144
check_clone 1161988
obj_insert 1161988
obj_init 1277800
gsizeword 2239615
obj_check 2689785
gerepileallsp 4139812
gerepilemanysp 12940410
bl_rotright 58165719
bl_rotleft 58569703
clone_unlock_deep 59299358
gsizeclone 227499957
gclone 227500591
newblock 228222779
gerepilecoeffssp 285282690
clone_unlock 315422049
copy_bin 371043709
clone_lock 374722810
gunclone 377584073
blocksearch 749021210
cgetg_copy_avma 783657779
gerepile 1011971458
blockdelete 1501514809
blockinsert 1631754915
shiftaddress 2576300091
blockbalance 2700233364
fix_height 2910035256
gunclone_deep 3216584307
gcopy_avma 3241817347
gsizeclone_i 3325615516
gcopy_av0 4081903903
taille0 4083183754
gcopy 4316123370
dec_gerepile 4541528176
blockheight 11220066946

Generated by: LCOV version 1.14