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 17707-04f73e4) Lines: 763 1155 66.1 %
Date: 2015-03-28 Functions: 91 130 70.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 386 784 49.2 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 129174279
cgetlist_avma 133
chk_gerepileupto 0
copy_bin 26991191
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1734122072
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 57931
err_init_msg 57903
err_recover 57602
errname 6976
f_getheap 6846
fill_stack 0
fix_size 5966
gclone 70944373
gclone_refc 0
gcloneref 297
gcopy 696359415
gcopy_av0 579039465
gcopy_av0_canon 0
gcopy_avma 171363562
gcopy_lg 938
gerepile 325862733
gerepileallsp 28
gerepilecoeffssp 66867419
gerepilemanysp 5215015
getabstime 2260
getdebugvar 0
getheap 84
getstack 7
gettime 3986
getwalltime 0
gp_context_restore 57651
gp_context_save 131159
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6846
gunclone 91012286
gunclone_deep 139271008
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 2260
list_internal_copy 616
listassign 616
listcopy 140
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 70948840
numerr_name 6976
obj_check 1974409
obj_checkbuild 583935
obj_checkbuild_padicprec 252
obj_checkbuild_prec 24284
obj_checkbuild_realprec 3585
obj_free 4144
obj_init 1057002
obj_insert 562517
obj_insert_shallow 1016572
pari_add_defaults_module 2260
pari_add_module 4520
pari_close 1752
pari_close_blocks 1752
pari_close_opts 1752
pari_daemon 6660
pari_err 72549
pari_err2GEN 72533
pari_err2str 65302
pari_err_display 57623
pari_err_last 29837
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 3078
pari_init_defaults 2260
pari_init_errcatch 3194
pari_init_functions 2260
pari_init_opts 2260
pari_init_timer 2260
pari_mainstack_alloc 3237
pari_mainstack_free 2729
pari_mainstack_malloc 3237
pari_mainstack_mfree 2729
pari_mainstack_mreset 113683
pari_mainstack_resize 113
pari_mainstack_use 3079
pari_sig_init 4012
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 2260
pari_thread_alloc 864
pari_thread_close 1752
pari_thread_free 864
pari_thread_init 3089
pari_thread_start 819
pari_thread_valloc 0
pari_version 0
pari_warn 308
paristack_alloc 2260
paristack_newrsize 119
paristack_resize 0
paristack_setsize 0
parivstack_reset 113683
parivstack_resize 0
pop_entree_block 114926
setdebugvar 0
shiftaddress 360474559
shiftaddress_canon 0
taille0 0
taille0_nolist 579039720
timer 0
timer2 0
timer_aux 62210
timer_delay 59948
timer_get 2262
timer_printf 0
timer_start 439292
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6146
words_to_allocate 242543154

Generated by: LCOV version 1.9