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 16791-0d1274a) Lines: 811 1149 70.6 %
Date: 2014-09-16 Functions: 96 128 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 418 777 53.8 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 83869750
cgetlist_avma 45
chk_gerepileupto 0
copy_bin 17731380
copy_bin_canon 20
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1000806583
dflt_err_recover 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 2034
err_init_msg 2019
err_recover 1874
errname 4925
f_getheap 8815
fill_stack 0
fix_size 1946
gclone 48060655
gclone_refc 0
gcloneref 50
gcopy 417722148
gcopy_av0 334270307
gcopy_av0_canon 92
gcopy_avma 90546751
gcopy_lg 950
gerepile 212339712
gerepileallsp 0
gerepilecoeffssp 44388283
gerepilemanysp 3457271
getabstime 918
getheap 70
getstack 10
gettime 1738
getwalltime 0
gp_context_restore 1909
gp_context_save 35096
gp_init_entrees 5
gp_init_functions 5
gsizebyte 5
gsizeword 8820
gunclone 61622128
gunclone_deep 70166552
icopy_avma_canon 8
init_hashtable 5
init_universal_constants 918
list_internal_copy 280
listassign 280
listcopy 50
msgtimer 0
name_numerr 15
new_chunk_resize 0
newblock 48062396
numerr_name 4925
obj_check 1391891
obj_checkbuild 413510
obj_checkbuild_padicprec 180
obj_checkbuild_prec 3421
obj_free 1300
obj_init 747825
obj_insert 397807
obj_insert_shallow 722147
pari_add_defaults_module 1836
pari_add_module 1836
pari_add_oldmodule 918
pari_close 886
pari_close_blocks 886
pari_close_opts 886
pari_daemon 320
pari_err 12445
pari_err2GEN 12440
pari_err2str 7339
pari_err_display 1879
pari_err_last 21121
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 918
pari_init_defaults 918
pari_init_errcatch 993
pari_init_functions 918
pari_init_opts 918
pari_init_timer 918
pari_mainstack_alloc 989
pari_mainstack_free 957
pari_mainstack_malloc 989
pari_mainstack_mfree 957
pari_mainstack_mreset 29079
pari_mainstack_resize 71
pari_mainstack_use 918
pari_sig_init 1804
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 918
pari_thread_alloc 0
pari_thread_close 886
pari_thread_free 0
pari_thread_init 918
pari_thread_start 0
pari_thread_valloc 0
pari_version 0
pari_warn 155
paristack_alloc 918
paristack_newrsize 75
paristack_resize 0
paristack_setsize 0
parivstack_reset 29079
parivstack_resize 0
pop_entree_block 13354
setdebugvar 0
shiftaddress 223816552
shiftaddress_canon 88
taille0 92
taille0_nolist 334270307
timer 0
timer2 0
timer_aux 29786
timer_delay 28868
timer_get 918
timer_printf 0
timer_start 212316
timer_vprintf 0
timetoi 0
trap0 15
traverseheap 70
type_dim 4340
words_to_allocate 138921011

Generated by: LCOV version 1.9