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 16624-25b9976) Lines: 808 1150 70.3 %
Date: 2014-06-24 Functions: 95 128 74.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 418 777 53.8 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 87260041
cgetlist_avma 45
chk_gerepileupto 0
copy_bin 18514912
copy_bin_canon 20
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1007751808
dflt_err_recover 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 2016
err_init_msg 2006
err_recover 1856
errname 4925
f_getheap 8805
fill_stack 0
fix_size 1936
gclone 48064906
gclone_refc 0
gcloneref 45
gcopy 437165981
gcopy_av0 354242299
gcopy_av0_canon 92
gcopy_avma 90535284
gcopy_lg 950
gerepile 214676584
gerepileallsp 0
gerepilecoeffssp 43703227
gerepilemanysp 3547796
getabstime 913
getheap 70
getstack 10
gettime 1728
getwalltime 0
gp_context_restore 1891
gp_context_save 34841
gp_init_entrees 5
gp_init_functions 5
gsizebyte 10
gsizeword 8815
gunclone 61626430
gunclone_deep 69875183
icopy_avma_canon 8
init_hashtable 5
init_universal_constants 913
list_internal_copy 280
listassign 280
listcopy 50
msgtimer 0
name_numerr 15
new_chunk_resize 0
newblock 48066733
numerr_name 4925
obj_check 1391710
obj_checkbuild 413328
obj_checkbuild_padicprec 180
obj_checkbuild_prec 3422
obj_free 1300
obj_init 747810
obj_insert 397769
obj_insert_shallow 722109
pari_add_defaults_module 1826
pari_add_module 1826
pari_add_oldmodule 913
pari_close 881
pari_close_blocks 881
pari_close_opts 881
pari_daemon 320
pari_err 12428
pari_err2GEN 12423
pari_err2str 7321
pari_err_display 1861
pari_err_last 21117
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 913
pari_init_defaults 913
pari_init_errcatch 988
pari_init_functions 913
pari_init_opts 913
pari_init_timer 913
pari_mainstack_alloc 984
pari_mainstack_free 952
pari_mainstack_malloc 984
pari_mainstack_mfree 952
pari_mainstack_mreset 28859
pari_mainstack_resize 71
pari_mainstack_use 913
pari_sig_init 1794
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 913
pari_thread_alloc 0
pari_thread_close 881
pari_thread_free 0
pari_thread_init 913
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 155
paristack_alloc 0
paristack_newrsize 75
paristack_resize 0
paristack_setsize 0
parivstack_reset 28859
parivstack_resize 0
pop_entree_block 13284
setdebugvar 0
shiftaddress 234795593
shiftaddress_canon 88
taille0 92
taille0_nolist 354242299
timer 0
timer2 0
timer_aux 29569
timer_delay 28656
timer_get 913
timer_printf 0
timer_start 255720
timer_vprintf 0
timetoi 0
trap0 15
traverseheap 70
type_dim 4340
words_to_allocate 138918814

Generated by: LCOV version 1.9