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.1 lcov report (development 22726-9e20c6a88) Lines: 837 1194 70.1 %
Date: 2018-06-23 05:36:28 Functions: 102 135 75.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
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_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
pari_sighandler 1
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
listcopy 207
pari_mainstack_resize 271
paristack_newrsize 277
obj_checkbuild_padicprec 497
pari_warn 529
gcopy_lg 588
list_internal_copy 697
listassign 697
pari_add_module 1535
getabstime 1545
init_universal_constants 1545
pari_add_defaults_module 1545
pari_init_defaults 1545
pari_init_functions 1545
pari_init_opts 1545
pari_init_timer 1545
pari_stackcheck_init 1545
paristack_alloc 1545
timer_get 1547
pari_close 1595
pari_close_opts 1595
gdisplay 2345
gettime 3036
pari_sig_init 3140
type_dim 6258
f_getheap 6699
err_recover 8674
pari_err_display 8695
gp_context_restore 8742
err_init_msg 9166
err_init 9224
pari_thread_sync 11058
obj_free 11886
obj_checkbuild_realprec 12013
pari_err2str 15952
os_signal 17235
errname 26947
numerr_name 26947
pari_err2GEN 43366
pari_err 43382
gcloneref 50859
pari_err_last 69359
timer_delay 72406
timer_aux 73953
parivstack_reset 78312
obj_checkbuild_prec 83448
gp_context_save 94410
pari_thread_start 110650
pari_close_blocks 110789
pari_thread_alloc 111521
pari_thread_free 111521
pari_mainstack_use 112157
pari_thread_close 112245
pari_init_blocks 112495
pari_thread_init 112653
pari_init_errcatch 112670
pari_mainstack_alloc 113337
pari_mainstack_malloc 113337
pari_mainstack_free 113387
pari_mainstack_mfree 113387
pop_entree_block 168818
gerepileallsp 186852
pari_mainstack_mextend 191649
pari_mainstack_mreset 191649
pari_mainstack_setsize 191649
fix_size 226724
timer_start 227460
obj_checkbuild 851882
obj_insert 1126605
obj_insert_shallow 1130700
obj_init 1208432
obj_check 2615247
gerepilemanysp 5809186
copy_bin 58360820
gerepilecoeffssp 116256623
gclone 212083077
gsizeclone 212083223
newblock 212349543
gunclone 246745770
cgetg_copy_avma 349322502
gerepile 439331904
shiftaddress 807846383
gcopy_av0 1147985576
taille0 1147987442
dec_gerepile 2081218257
gcopy_avma 2825026122
gsizeclone_i 2894468308
gunclone_deep 2931924806
gcopy 3320849463

Generated by: LCOV version 1.13