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.8.0 lcov report (development 18946-c0ba5ba) Lines: 792 1165 68.0 %
Date: 2016-05-24 Functions: 93 131 71.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 392 793 49.4 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 166872995
cgetlist_avma 133
chk_gerepileupto 0
copy_bin 38356009
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 2016688751
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 58365
err_init_msg 58337
err_recover 57959
errname 7277
f_getheap 6615
fill_stack 0
fix_size 391978
gclone 129995009
gclone_refc 0
gcloneref 296
gcopy 3032369839
gcopy_av0 762753496
gcopy_av0_canon 0
gcopy_avma 2468581933
gcopy_lg 259
gdisplay 2338
gerepile 393620562
gerepileallsp 98
gerepilecoeffssp 96368774
gerepilemanysp 5699280
getabstime 2344
getdebugvar 0
getheap 84
getstack 7
gettime 4154
getwalltime 0
gp_context_restore 58008
gp_context_save 140156
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6615
gunclone 169313792
gunclone_deep 2477719247
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 2344
list_internal_copy 683
listassign 683
listcopy 165
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 130029743
numerr_name 7277
obj_check 2129094
obj_checkbuild 713399
obj_checkbuild_padicprec 252
obj_checkbuild_prec 25908
obj_checkbuild_realprec 4257
obj_free 5117
obj_init 1132337
obj_insert 1090366
obj_insert_shallow 1093019
pari_add_defaults_module 2344
pari_add_module 4688
pari_close 1836
pari_close_blocks 1836
pari_close_opts 1836
pari_daemon 6660
pari_err 73263
pari_err2GEN 73247
pari_err2str 65554
pari_err_display 57980
pari_err_last 30551
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 179039
pari_init_defaults 2344
pari_init_errcatch 177729
pari_init_functions 2344
pari_init_opts 2344
pari_init_timer 2344
pari_mainstack_alloc 196243
pari_mainstack_free 195735
pari_mainstack_malloc 196243
pari_mainstack_mfree 195735
pari_mainstack_mreset 120912
pari_mainstack_resize 155
pari_mainstack_use 183644
pari_sig_init 4180
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 2344
pari_thread_alloc 193744
pari_thread_close 1836
pari_thread_free 193744
pari_thread_init 191943
pari_thread_start 176792
pari_thread_valloc 0
pari_version 7
pari_warn 385
paristack_alloc 2344
paristack_newrsize 161
paristack_resize 0
paristack_setsize 0
parivstack_reset 120912
parivstack_resize 0
pop_entree_block 125454
setdebugvar 0
shiftaddress 480673010
shiftaddress_canon 0
taille0 762754010
taille0_canon 0
timer 0
timer2 0
timer_aux 69292
timer_delay 66946
timer_get 2346
timer_printf 0
timer_start 517230
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6132
words_to_allocate 2598656798

Generated by: LCOV version 1.9