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 18607-f2efcf2) Lines: 785 1158 67.8 %
Date: 2016-02-12 Functions: 92 130 70.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 388 786 49.4 %

Function Name Sort by function name Hit count Sort by hit count
cgetg_copy_avma 155470497
cgetlist_avma 133
chk_gerepileupto 0
copy_bin 36933587
copy_bin_canon 0
dbg_gerepile 0
dbg_gerepileupto 0
debug_stack 0
dec_gerepile 1926387703
dflt_err_recover 0
dflt_pari_quit 0
dflt_sigint_fun 0
dochk_gerepileupto 0
err_init 58288
err_init_msg 58260
err_recover 57896
errname 7277
f_getheap 6482
fill_stack 0
fix_size 11502
gclone 129010301
gclone_refc 0
gcloneref 296
gcopy 2995193203
gcopy_av0 722327041
gcopy_av0_canon 0
gcopy_avma 2453497900
gcopy_lg 259
gerepile 367035531
gerepileallsp 70
gerepilecoeffssp 93936179
gerepilemanysp 5628983
getabstime 2330
getdebugvar 0
getheap 84
getstack 7
gettime 4126
getwalltime 0
gp_context_restore 57945
gp_context_save 137998
gp_init_entrees 0
gp_init_functions 0
gsizebyte 0
gsizeword 6482
gunclone 168222596
gunclone_deep 2468233340
icopy_avma_canon 0
init_hashtable 0
init_universal_constants 2330
list_internal_copy 637
listassign 637
listcopy 147
msgtimer 0
name_numerr 21
new_chunk_resize 0
newblock 129044112
numerr_name 7277
obj_check 2085579
obj_checkbuild 688777
obj_checkbuild_padicprec 252
obj_checkbuild_prec 24613
obj_checkbuild_realprec 3732
obj_free 4977
obj_init 1130171
obj_insert 1087066
obj_insert_shallow 1089306
pari_add_defaults_module 2330
pari_add_module 4660
pari_close 1822
pari_close_blocks 1822
pari_close_opts 1822
pari_daemon 6660
pari_err 73319
pari_err2GEN 73303
pari_err2str 65596
pari_err_display 57917
pari_err_last 30789
pari_exit 0
pari_handle_SIGINT 0
pari_init 0
pari_init_blocks 5364
pari_init_defaults 2330
pari_init_errcatch 5499
pari_init_functions 2330
pari_init_opts 2330
pari_init_timer 2330
pari_mainstack_alloc 6005
pari_mainstack_free 5497
pari_mainstack_malloc 6005
pari_mainstack_mfree 5497
pari_mainstack_mreset 119139
pari_mainstack_resize 155
pari_mainstack_use 5408
pari_sig_init 4152
pari_sighandler 0
pari_sigint 0
pari_stackcheck_init 2330
pari_thread_alloc 3520
pari_thread_close 1822
pari_thread_free 3520
pari_thread_init 5687
pari_thread_start 3079
pari_thread_valloc 0
pari_version 7
pari_warn 371
paristack_alloc 2330
paristack_newrsize 161
paristack_resize 0
paristack_setsize 0
parivstack_reset 119139
parivstack_resize 0
pop_entree_block 125797
setdebugvar 0
shiftaddress 447198519
shiftaddress_canon 0
taille0 0
taille0_nolist 722327593
timer 0
timer2 0
timer_aux 67540
timer_delay 65208
timer_get 2332
timer_printf 0
timer_start 500876
timer_vprintf 0
timetoi 0
trap0 21
traverseheap 84
type_dim 6146
words_to_allocate 2582674576

Generated by: LCOV version 1.9