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 16741-1378b1c) Lines: 766 1149 66.7 %
Date: 2014-08-17 Functions: 91 128 71.1 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 392 777 50.5 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 85920042
cgetlist_avma 45
chk_gerepileupto 0
copy_bin 18147023
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 997673931
dflt_err_recover 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 2605
err_init_msg 2590
err_recover 2445
errname 4925
f_getheap 8815
fill_stack 0
fix_size 1854
gclone 48301699
gclone_refc 0
gcloneref 50
gcopy 419240638
gcopy_av0 340681943
gcopy_av0_canon 0
gcopy_avma 90589036
gcopy_lg 950
gerepile 211751186
gerepileallsp 0
gerepilecoeffssp 44177470
gerepilemanysp 3526999
getabstime 862
getheap 70
getstack 10
gettime 1694
getwalltime 0
gp_context_restore 2480
gp_context_save 34346
gp_init_entrees 5
gp_init_functions 5
gsizebyte 5
gsizeword 8820
gunclone 61863623
gunclone_deep 70164559
icopy_avma_canon 0
init_hashtable 5
init_universal_constants 862
list_internal_copy 280
listassign 280
listcopy 50
msgtimer 0
name_numerr 15
new_chunk_resize 0
newblock 48303445
numerr_name 4925
obj_check 1391771
obj_checkbuild 413390
obj_checkbuild_padicprec 180
obj_checkbuild_prec 3421
obj_free 1300
obj_init 747810
obj_insert 397752
obj_insert_shallow 722092
pari_add_defaults_module 1724
pari_add_module 1724
pari_add_oldmodule 862
pari_close 850
pari_close_blocks 850
pari_close_opts 850
pari_daemon 52
pari_err 13021
pari_err2GEN 13016
pari_err2str 7910
pari_err_display 2450
pari_err_last 21126
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 862
pari_init_defaults 862
pari_init_errcatch 937
pari_init_functions 862
pari_init_opts 862
pari_init_timer 862
pari_mainstack_alloc 933
pari_mainstack_free 921
pari_mainstack_malloc 933
pari_mainstack_mfree 921
pari_mainstack_mreset 28493
pari_mainstack_resize 71
pari_mainstack_use 862
pari_sig_init 1712
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 862
pari_thread_alloc 0
pari_thread_close 850
pari_thread_free 0
pari_thread_init 862
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 155
paristack_alloc 862
paristack_newrsize 75
paristack_resize 0
paristack_setsize 0
parivstack_reset 28493
parivstack_resize 0
pop_entree_block 13290
setdebugvar 0
shiftaddress 228407168
shiftaddress_canon 0
taille0 0
taille0_nolist 340681943
timer 0
timer2 0
timer_aux 28529
timer_delay 27667
timer_get 862
timer_printf 0
timer_start 253067
timer_vprintf 0
timetoi 0
trap0 15
traverseheap 70
type_dim 4340
words_to_allocate 139204340

Generated by: LCOV version 1.9