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 16962-5a32637) Lines: 758 1154 65.7 %
Date: 2014-10-29 Functions: 87 128 68.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 385 763 50.5 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 117825893
cgetlist_avma 63
chk_gerepileupto 0
copy_bin 25158259
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1442240644
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 6137
err_init_msg 6109
err_recover 5906
errname 6902
f_getheap 6846
fill_stack 0
fix_size 2588
gclone 67555314
gclone_refc 0
gcloneref 70
gcopy 584105287
gcopy_av0 474103142
gcopy_av0_canon 0
gcopy_avma 127598697
gcopy_lg 938
gerepile 297613627
gerepileallsp 14
gerepilecoeffssp 61968853
gerepilemanysp 4879752
getabstime 1201
getheap 84
getstack 7
gettime 2368
getwalltime 0
gp_context_restore 5955
gp_context_save 47122
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6846
gunclone 86541962
gunclone_deep 98698562
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 1201
list_internal_copy 392
listassign 392
listcopy 70
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 67557663
numerr_name 6902
obj_check 1948164
obj_checkbuild 578914
obj_checkbuild_padicprec 252
obj_checkbuild_prec 4516
obj_free 1820
obj_init 1053094
obj_insert 556866
obj_insert_shallow 1010879
pari_add_defaults_module 1201
pari_add_module 2402
pari_close 1189
pari_close_blocks 1189
pari_close_opts 1189
pari_daemon 52
pari_err 20726
pari_err2GEN 20719
pari_err2str 13564
pari_err_display 5927
pari_err_last 29583
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 1201
pari_init_defaults 1201
pari_init_errcatch 1306
pari_init_functions 1201
pari_init_opts 1201
pari_init_timer 1201
pari_mainstack_alloc 1300
pari_mainstack_free 1288
pari_mainstack_malloc 1300
pari_mainstack_mfree 1288
pari_mainstack_mreset 39054
pari_mainstack_resize 99
pari_mainstack_use 1201
pari_sig_init 2390
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 1201
pari_thread_alloc 0
pari_thread_close 1189
pari_thread_free 0
pari_thread_init 1201
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 210
paristack_alloc 1201
paristack_newrsize 105
paristack_resize 0
paristack_setsize 0
parivstack_reset 39054
parivstack_resize 0
pop_entree_block 17990
setdebugvar 0
shiftaddress 316834586
shiftaddress_canon 0
taille0 0
taille0_nolist 474103142
timer 0
timer2 0
timer_aux 36612
timer_delay 35411
timer_get 1201
timer_printf 0
timer_start 296549
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6076
words_to_allocate 195402698

Generated by: LCOV version 1.9