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 29465-f396510193) Lines: 1172 1497 78.3 %
Date: 2024-07-25 09:03:53 Functions: 138 163 84.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
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 1
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 424
paristack_newrsize 431
obj_checkbuild_padicprec 546
cgetlist_avma 620
listcopy 730
gcopy_lg 742
pari_warn 746
export_get 1499
pari_add_module 1841
pari_close 1841
pari_close_export 1841
pari_close_opts 1841
init_universal_constants 1851
pari_add_defaults_module 1851
pari_init_defaults 1851
pari_init_export 1851
pari_init_functions 1851
pari_init_opts 1851
pari_init_timer 1851
paristack_alloc 1851
getabstime 1863
timer_get 1869
setalldebug 1879
gettime 3620
gdisplay 3682
pari_sig_init 3692
f_getheap 6664
list_internal_copy 6676
listassign 6676
type_dim 7322
err_recover 12279
pari_err_display 12300
gp_context_restore 12354
err_init_msg 12906
err_init 13046
traverseheap_r 13412
os_signal 20301
pari_err2str 21078
errname 27109
numerr_name 27109
gcloneref 37888
pari_err2GEN 48976
pari_err 48995
pari_err_last 73370
walltimer_delay 100688
timer_delay 104308
parivstack_reset 113389
gp_context_save 136592
obj_free 186340
obj_insert_shallow 189945
timer_aux 206865
rndus 206873
walltimer_start 236640
pari_close_blocks 315602
pop_entree_block 315637
pari_thread_set_global 322424
setdebugvar 322430
pari_thread_start 322673
getdebugvar 322701
pari_thread_alloc 322701
pari_thread_free 322701
pari_thread_get_global 322701
pari_thread_close 322904
pari_init_blocks 324482
pari_thread_init 324490
pari_mainstack_use 324502
pari_init_errcatch 324883
pari_mainstack_free 324966
pari_mainstack_mfree 324966
pari_mainstack_alloc 324976
pari_mainstack_malloc 324976
pari_stackcheck_init 326334
timer_start 340648
obj_checkbuild_realprec 398512
pari_mainstack_mextend 438365
pari_mainstack_mreset 438365
pari_mainstack_setsize 438365
obj_checkbuild_prec 507417
fix_size 649942
obj_checkbuild 1032146
obj_init 1621912
check_clone 1747560
obj_insert 1747560
gsizeword 2240217
obj_check 4506627
gerepileallsp 6306764
gerepilemanysp 21489458
clone_unlock_deep 59295466
bl_rotright 60538129
bl_rotleft 63535419
vec_gunclone_deep 127307552
gsizeclone 231445564
gclone 231445701
newblock 232184993
gerepilecoeffssp 307332152
clone_unlock 317395180
clone_lock 376666177
gunclone 382085842
copy_bin 448711777
blocksearch 752897321
cgetg_copy_avma 985124950
gerepile 1204383796
blockdelete 1522240467
blockinsert 1662991431
blockbalance 2741304769
shiftaddress 2910541293
fix_height 2968878944
gunclone_deep 3241128614
gcopy_avma 3265349160
gsizeclone_i 3352747891
gcopy_av0 3735762253
taille0 3736231812
gcopy 4477203718
dec_gerepile 4898908676
blockheight 11420273867

Generated by: LCOV version 1.16