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 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.10.0 lcov report (development 21913-852521c) Lines: 881 1186 74.3 %
Date: 2018-02-19 06:15:51 Functions: 108 134 80.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
chk_gerepileupto 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
fill_stack 0
gclone_refc 0
getdebugvar 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
getstack 7
new_chunk_resize 7
pari_version 7
getwalltime 8
timetoi 8
copy_bin_canon 12
icopy_avma_canon 12
shiftaddress_canon 20
name_numerr 21
trap0 21
gcopy_av0_canon 28
taille0_canon 28
obj_reinit 35
pari_daemon 60
getheap 84
traverseheap 84
cgetlist_avma 133
gsizebyte 147
listcopy 215
pari_mainstack_resize 264
paristack_newrsize 270
obj_checkbuild_padicprec 497
pari_warn 508
gcopy_lg 588
list_internal_copy 698
listassign 698
pari_add_module 1557
pari_close 1557
pari_close_opts 1557
init_universal_constants 1559
pari_add_defaults_module 1559
pari_init_defaults 1559
pari_init_functions 1559
pari_init_opts 1559
pari_init_timer 1559
pari_stackcheck_init 1559
paristack_alloc 1559
getabstime 1571
timer_get 1577
gdisplay 2296
gettime 3060
pari_sig_init 3116
type_dim 6258
f_getheap 6699
gsizeword 6846
err_recover 8371
pari_err_display 8392
gp_context_restore 8441
err_init_msg 8844
err_init 8900
obj_free 9268
pari_thread_sync 10508
obj_checkbuild_realprec 11523
pari_err2str 15651
os_signal 17137
errname 26955
numerr_name 26955
obj_checkbuild_prec 35225
pari_err2GEN 43062
pari_err 43078
gcloneref 50419
timer_delay 67759
timer_aux 69336
pari_err_last 69360
parivstack_reset 73333
pari_thread_start 88155
gp_context_save 88749
pari_thread_alloc 89256
pari_thread_free 89256
pari_init_blocks 89747
pari_mainstack_use 89757
pari_init_errcatch 89968
pari_close_blocks 90279
pari_thread_init 90391
pari_thread_close 90586
pari_mainstack_free 91077
pari_mainstack_mfree 91077
pari_mainstack_alloc 91079
pari_mainstack_malloc 91079
pop_entree_block 151472
pari_mainstack_mextend 164412
pari_mainstack_mreset 164412
pari_mainstack_setsize 164412
fix_size 182156
gerepileallsp 189367
timer_start 225811
obj_checkbuild 741762
obj_insert 1100248
obj_insert_shallow 1103559
obj_init 1859025
obj_check 2426615
gerepilemanysp 5485221
copy_bin 53709800
gerepilecoeffssp 93243356
gclone 208805812
gsizeclone 208812641
newblock 209027311
gunclone 243352904
cgetg_copy_avma 325792058
gerepile 403315794
shiftaddress 760708193
gcopy_av0 1073335295
taille0 1073336588
dec_gerepile 1904364223
gcopy_avma 2762710967
gsizeclone_i 2831787795
gunclone_deep 2867986927
gcopy 3278825017

Generated by: LCOV version 1.11