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 - compile.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16912-212c0f0) Lines: 1221 1423 85.8 %
Date: 2014-10-20 Functions: 71 78 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 665 875 76.0 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 18852
checkdups 6512
closure_deriv 7
closurefunc 4169
compilecall 9004
compilecast 4632967
compilecast_loc 4633926
compilefunc 2313192
compilefuncinline 7052
compilelambda 0
compilelocal 7
compilelvalue 469
compilemat 5642
compilematcoeff 2872
compilemy 756
compilenewptr 224
compilenode 11831990
compileseq 5054
compilesmall 6195876
compilestate_reset 105
compilestate_restore 20052
compilestate_save 1278563
compilestore 11860
compileuninline 0
compileuserfunc 8836
compilevec 3496515
copyifclone 83239
countlisttogen 11714275
countvar 763
ctxmvar 1586
data_push 1533968
debug_context 0
detag 127361
first_safe_arg 4638860
frame_push 6533
genclosure 4176
get_ret_type 2808489
getclosure 7108
getcodepos 61650
getentry 110265
getfunc 4749511
getfunction 61643
getlvalue 12763
getmvar 109007
getvar 22857
gp_closure 51990
is_func_named 18500065
is_node_zero 1029
listtogen 11714205
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 3383
op_insert_loc 1477
op_push 25923224
op_push_loc 26455328
optimizecall 9011
optimizefunc 2311592
optimizemat 5642
optimizematcoeff 3117
optimizenode 13683798
optimizeseq 5054
optimizevec 3496641
pack_localvars 35
pari_close_compiler 1186
pari_init_compiler 1218
pari_translate_string 0
parseproto 6162933
push_frame 175
snm_closure 0
str_defproto 35
strntoGENexp 1026694
strtoclosure 7
strtofunction 0
translate 1026694
var_push 41015
vec_optimize 3546146

Generated by: LCOV version 1.9