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 28697-a4113027d0) Lines: 1165 1495 77.9 %
Date: 2023-09-28 07:47:45 Functions: 137 162 84.6 %
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_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
pari_sighandler 3
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 1500
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 37782
pari_err2GEN 47361
pari_err 47380
obj_checkbuild_realprec 65365
obj_insert_shallow 68138
pari_err_last 70740
walltimer_delay 98052
timer_delay 101588
parivstack_reset 110406
gp_context_save 132828
obj_checkbuild_prec 170651
timer_aux 201467
rndus 201475
walltimer_start 230286
pop_entree_block 303513
pari_close_blocks 314882
setdebugvar 318451
pari_thread_set_global 318455
pari_thread_start 318852
getdebugvar 319021
pari_thread_alloc 319021
pari_thread_free 319021
pari_thread_get_global 319021
pari_thread_close 319430
pari_thread_init 320561
pari_mainstack_use 320646
pari_init_blocks 320664
pari_init_errcatch 320933
pari_mainstack_free 321198
pari_mainstack_mfree 321198
pari_mainstack_alloc 321208
pari_mainstack_malloc 321208
pari_stackcheck_init 322343
timer_start 334230
pari_mainstack_mextend 431614
pari_mainstack_mreset 431614
pari_mainstack_setsize 431614
fix_size 642406
obj_checkbuild 810119
check_clone 1161981
obj_insert 1161981
obj_init 1277798
gsizeword 2239615
obj_check 2689824
gerepileallsp 4166768
gerepilemanysp 12889106
bl_rotright 57996770
bl_rotleft 58627731
clone_unlock_deep 59290648
gsizeclone 227584018
gclone 227584610
newblock 228312106
gerepilecoeffssp 278898519
clone_unlock 316429604
copy_bin 364889631
clone_lock 375707758
gunclone 377646098
blocksearch 751059446
cgetg_copy_avma 771385045
gerepile 1020434265
blockdelete 1503952909
blockinsert 1633464467
shiftaddress 2330547350
blockbalance 2704263655
fix_height 2913798615
gunclone_deep 3215472211
gcopy_avma 3238869047
gsizeclone_i 3323496101
gcopy_av0 3709583189
taille0 3710726112
gcopy 4397939723
dec_gerepile 4555513513
blockheight 11235673063

Generated by: LCOV version 1.14