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 17404-c89e0b8) Lines: 754 1153 65.4 %
Date: 2015-01-30 Functions: 88 129 68.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 382 777 49.2 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 125354120
cgetlist_avma 63
chk_gerepileupto 0
copy_bin 26513142
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1553433860
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 6619
err_init_msg 6591
err_recover 6318
errname 6965
f_getheap 6846
fill_stack 0
fix_size 2700
gclone 70275134
gclone_refc 0
gcloneref 280
gcopy 662807525
gcopy_av0 541841632
gcopy_av0_canon 0
gcopy_avma 164394068
gcopy_lg 938
gerepile 313334477
gerepileallsp 28
gerepilecoeffssp 67399390
gerepilemanysp 4912580
getabstime 1243
getheap 84
getstack 7
gettime 2452
getwalltime 0
gp_context_restore 6367
gp_context_save 52974
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6846
gunclone 90127961
gunclone_deep 136061999
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 1243
list_internal_copy 392
listassign 392
listcopy 84
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 70279414
numerr_name 6965
obj_check 1953371
obj_checkbuild 583652
obj_checkbuild_padicprec 252
obj_checkbuild_prec 4005
obj_checkbuild_realprec 3585
obj_free 4137
obj_init 1056244
obj_insert 561765
obj_insert_shallow 1015820
pari_add_defaults_module 1243
pari_add_module 2486
pari_close 1231
pari_close_blocks 1231
pari_close_opts 1231
pari_daemon 52
pari_err 21250
pari_err2GEN 21243
pari_err2str 14018
pari_err_display 6339
pari_err_last 29807
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 1243
pari_init_defaults 1243
pari_init_errcatch 1362
pari_init_functions 1243
pari_init_opts 1243
pari_init_timer 1243
pari_mainstack_alloc 1356
pari_mainstack_free 1344
pari_mainstack_malloc 1356
pari_mainstack_mfree 1344
pari_mainstack_mreset 43793
pari_mainstack_resize 113
pari_mainstack_use 1243
pari_sig_init 2474
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 1243
pari_thread_alloc 0
pari_thread_close 1231
pari_thread_free 0
pari_thread_init 1243
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 280
paristack_alloc 1243
paristack_newrsize 119
paristack_resize 0
paristack_setsize 0
parivstack_reset 43793
parivstack_resize 0
pop_entree_block 48055
setdebugvar 0
shiftaddress 345063641
shiftaddress_canon 0
taille0 0
taille0_nolist 541841632
timer 0
timer2 0
timer_aux 41051
timer_delay 39808
timer_get 1243
timer_printf 0
timer_start 338726
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6076
words_to_allocate 234918344

Generated by: LCOV version 1.9