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-bordeaux.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 - compile.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 21064-a7054ad) Lines: 1343 1493 90.0 %
Date: 2017-09-25 06:24:50 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addcopy 156253
call0 21
cattovec 32288
checkdups 12724
closure_deriv 56
closurefunc 6531
compilecall 17617
compilecast 5396916
compilecast_loc 5449946
compilefunc 2665770
compilefuncinline 13138
compilelambda 66
compilelocal 7
compilelvalue 987
compilemat 7329
compilematcoeff 7878
compilemy 1968
compilenewptr 462
compilenode 13275898
compileseq 8674
compilesmall 6801688
compilestate_reset 228
compilestate_restore 22578
compilestate_save 1317588
compilestore 24904
compileuninline 12
compilevec 3801192
countlisttogen 13072820
countvar 1975
ctxmvar 7164
data_push 1785415
debug_context 0
detag 247052
fetch_member_raw 20713
first_safe_arg 5371646
frame_push 68160
genclosure 58129
genclosurectx 51585
get_ret_type 3393823
getclosure 13128
getcodepos 155256
getentry 209688
getfunc 5568189
getfunction 155242
getlvalue 26668
getmvar 206810
getvar 46904
gp_closure 81878
is_func_named 23975534
is_node_zero 2331
listtogen 13072624
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 8977
op_insert_loc 1673
op_push 28647640
op_push_loc 29676530
optimizecall 17624
optimizefunc 2663114
optimizemat 7329
optimizematcoeff 8403
optimizenode 15338306
optimizeseq 8674
optimizevec 3801717
pack_localvars 35
pari_close_compiler 65954
pari_init_compiler 66016
pari_translate_string 0
parseproto 8316611
push_frame 231
snm_closure 2693
str_defproto 39
strntoGENexp 1106546
strtoclosure 48905
strtofunction 7
translate 1106546
var_push 50882
vec_optimize 3874028

Generated by: LCOV version 1.11