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 23339-b1c33c51a) Lines: 855 1235 69.2 %
Date: 2018-12-11 05:41:34 Functions: 106 142 74.6 %
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
exportall 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
unexportall 0
export_add 2
export_del 2
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
export_get 195
listcopy 207
pari_mainstack_resize 285
paristack_newrsize 291
obj_checkbuild_padicprec 497
pari_warn 550
gcopy_lg 588
list_internal_copy 718
listassign 718
pari_add_module 1549
pari_close 1549
pari_close_export 1549
pari_close_opts 1549
getabstime 1559
init_universal_constants 1559
pari_add_defaults_module 1559
pari_init_defaults 1559
pari_init_export 1559
pari_init_functions 1559
pari_init_opts 1559
pari_init_timer 1559
pari_stackcheck_init 1559
paristack_alloc 1559
timer_get 1561
gdisplay 2359
gettime 3064
pari_sig_init 3108
type_dim 6384
f_getheap 6762
err_recover 9129
pari_err_display 9150
gp_context_restore 9197
err_init_msg 9614
err_init 9700
obj_free 11886
pari_thread_sync 11914
obj_checkbuild_realprec 12013
pari_err2str 16386
os_signal 17089
errname 26947
numerr_name 26947
pari_err2GEN 43842
pari_err 43858
gcloneref 50866
pari_err_last 69401
timer_delay 74517
timer_aux 76078
parivstack_reset 80864
obj_checkbuild_prec 83469
gp_context_save 97433
pari_thread_start 116681
pari_close_blocks 116937
pari_thread_alloc 117689
pari_thread_free 117689
pari_mainstack_use 118190
pari_thread_close 118310
pari_init_blocks 118568
pari_thread_init 118733
pari_init_errcatch 118771
pari_mainstack_free 119523
pari_mainstack_mfree 119523
pari_mainstack_alloc 119533
pari_mainstack_malloc 119533
pop_entree_block 175454
gerepileallsp 189300
pari_mainstack_mextend 200397
pari_mainstack_mreset 200397
pari_mainstack_setsize 200397
timer_start 232699
fix_size 239056
obj_checkbuild 872750
obj_insert 1129139
obj_insert_shallow 1133234
obj_init 1212089
obj_check 2637109
gerepilemanysp 5954778
copy_bin 63542828
gerepilecoeffssp 134981414
gclone 207272841
gsizeclone 207272987
newblock 207550930
gunclone 241950169
cgetg_copy_avma 382827612
gerepile 496256640
shiftaddress 877500937
gcopy_av0 1221833219
taille0 1221840553
dec_gerepile 2165050108
gcopy_avma 2828531363
gsizeclone_i 2897969069
gunclone_deep 2924307637
gcopy 3501566061

Generated by: LCOV version 1.13