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-bordeaux1.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.8.0 lcov report (development 17961-e5c317c) Lines: 783 1155 67.8 %
Date: 2015-09-05 Functions: 92 130 70.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 389 784 49.6 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 138845996
cgetlist_avma 133
chk_gerepileupto 0
copy_bin 28548741
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1875179258
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 58064
err_init_msg 58036
err_recover 57686
errname 6976
f_getheap 6811
fill_stack 0
fix_size 6426
gclone 128730789
gclone_refc 0
gcloneref 297
gcopy 2976049381
gcopy_av0 631699875
gcopy_av0_canon 0
gcopy_avma 2439475516
gcopy_lg 938
gerepile 358813273
gerepileallsp 28
gerepilecoeffssp 88285749
gerepilemanysp 5615897
getabstime 2302
getdebugvar 0
getheap 84
getstack 7
gettime 4070
getwalltime 0
gp_context_restore 57735
gp_context_save 133203
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6811
gunclone 167868038
gunclone_deep 2456373798
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 2302
list_internal_copy 637
listassign 637
listcopy 147
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 128764122
numerr_name 6976
obj_check 2032370
obj_checkbuild 638501
obj_checkbuild_padicprec 252
obj_checkbuild_prec 24319
obj_checkbuild_realprec 3620
obj_free 4683
obj_init 1086855
obj_insert 1043285
obj_insert_shallow 1045028
pari_add_defaults_module 2302
pari_add_module 4604
pari_close 1794
pari_close_blocks 1794
pari_close_opts 1794
pari_daemon 6660
pari_err 72633
pari_err2GEN 72617
pari_err2str 65386
pari_err_display 57707
pari_err_last 29837
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 3239
pari_init_defaults 2302
pari_init_errcatch 3382
pari_init_functions 2302
pari_init_opts 2302
pari_init_timer 2302
pari_mainstack_alloc 3467
pari_mainstack_free 2959
pari_mainstack_malloc 3467
pari_mainstack_mfree 2959
pari_mainstack_mreset 115163
pari_mainstack_resize 141
pari_mainstack_use 3247
pari_sig_init 4096
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 2302
pari_thread_alloc 1024
pari_thread_close 1794
pari_thread_free 1024
pari_thread_init 3243
pari_thread_start 942
pari_thread_valloc 0
pari_version 7
pari_warn 357
paristack_alloc 2302
paristack_newrsize 147
paristack_resize 0
paristack_setsize 0
parivstack_reset 115163
parivstack_resize 0
pop_entree_block 115444
setdebugvar 0
shiftaddress 386043497
shiftaddress_canon 0
taille0 0
taille0_nolist 631699950
timer 0
timer2 0
timer_aux 63704
timer_delay 61400
timer_get 2304
timer_printf 0
timer_start 460202
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6146
words_to_allocate 2568441189

Generated by: LCOV version 1.9