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.2 lcov report (development 29115-f22e516b23) Lines: 1169 1497 78.1 %
Date: 2024-04-19 08:07:09 Functions: 137 163 84.0 %
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
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
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 42
export_add 59
pari_daemon 76
getheap 84
traverseheap 84
setdebug 127
gsizebyte 168
pari_mainstack_resize 410
paristack_newrsize 417
cgetlist_avma 522
obj_checkbuild_padicprec 546
listcopy 625
pari_warn 732
gcopy_lg 742
export_get 1500
pari_add_module 1820
pari_close 1820
pari_close_export 1820
pari_close_opts 1820
init_universal_constants 1830
pari_add_defaults_module 1830
pari_init_defaults 1830
pari_init_export 1830
pari_init_functions 1830
pari_init_opts 1830
pari_init_timer 1830
paristack_alloc 1830
getabstime 1842
timer_get 1848
setalldebug 1858
gettime 3578
pari_sig_init 3650
gdisplay 3661
list_internal_copy 6473
listassign 6473
f_getheap 6664
type_dim 7394
err_recover 12154
pari_err_display 12211
gp_context_restore 12229
err_init_msg 12803
err_init 12943
traverseheap_r 13412
os_signal 20070
pari_err2str 20996
errname 27088
numerr_name 27088
gcloneref 37867
pari_err2GEN 48866
pari_err 48885
pari_err_last 73328
walltimer_delay 99581
timer_delay 103159
parivstack_reset 112143
gp_context_save 134905
obj_free 149660
obj_insert_shallow 154280
timer_aux 204588
rndus 204596
walltimer_start 233860
pari_close_blocks 311473
pop_entree_block 313224
pari_thread_set_global 316025
setdebugvar 316055
pari_thread_start 316536
getdebugvar 316677
pari_thread_alloc 316677
pari_thread_free 316677
pari_thread_get_global 316677
pari_thread_close 317387
pari_init_blocks 318242
pari_thread_init 318246
pari_mainstack_use 318332
pari_init_errcatch 318510
pari_mainstack_free 318907
pari_mainstack_mfree 318907
pari_mainstack_alloc 318917
pari_mainstack_malloc 318917
pari_stackcheck_init 320035
timer_start 337671
obj_checkbuild_realprec 352657
pari_mainstack_mextend 431060
pari_mainstack_mreset 431060
pari_mainstack_setsize 431060
obj_checkbuild_prec 461562
fix_size 637824
obj_checkbuild 1021431
obj_init 1569719
check_clone 1688241
obj_insert 1688241
gsizeword 2239923
obj_check 4297363
gerepileallsp 6083304
gerepilemanysp 20838398
bl_rotright 55862994
clone_unlock_deep 59295228
bl_rotleft 61035200
vec_gunclone_deep 127025167
gsizeclone 231564776
gclone 231565091
newblock 232281969
gerepilecoeffssp 296291016
clone_unlock 318899092
clone_lock 378209861
gunclone 382183733
copy_bin 439279409
blocksearch 756064753
cgetg_copy_avma 971372533
gerepile 1168290438
blockdelete 1546411096
blockinsert 1673223234
blockbalance 2773785101
shiftaddress 2915843909
fix_height 2988698672
gunclone_deep 3239378151
gcopy_avma 3261246260
gsizeclone_i 3349046799
gcopy 4472615956
gcopy_av0 4494464919
taille0 4495040346
dec_gerepile 4809352538
blockheight 11524845509

Generated by: LCOV version 1.14