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 17097-9391e68) Lines: 1227 1430 85.8 %
Date: 2014-11-21 Functions: 71 78 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 672 881 76.3 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 13798
checkdups 5260
closure_deriv 5
closurefunc 3077
compilecall 6680
compilecast 3325057
compilecast_loc 3325742
compilefunc 1657604
compilefuncinline 5872
compilelambda 0
compilelocal 5
compilelvalue 345
compilemat 4030
compilematcoeff 2231
compilemy 615
compilenewptr 165
compilenode 8468205
compileseq 3837
compilesmall 4426318
compilestate_reset 75
compilestate_restore 14995
compilestate_save 914961
compilestore 9258
compileuninline 0
compilevec 2497869
copyifclone 62319
countlisttogen 8379693
countvar 620
ctxmvar 1220
data_push 1101274
debug_context 0
detag 97302
fetch_member_raw 13315
first_safe_arg 3331048
frame_push 5280
genclosure 3082
get_ret_type 2017814
getclosure 5912
getcodepos 46227
getentry 83574
getfunc 3408248
getfunction 46222
getlvalue 9973
getmvar 81919
getvar 18178
gp_closure 38405
is_func_named 13256007
is_node_zero 895
listtogen 8379643
localpush 30
localvars_find 5
localvars_read_str 6995
matchQ 0
matindex_type 2606
op_insert_loc 1055
op_push 18532892
op_push_loc 18920730
optimizecall 6685
optimizefunc 1656362
optimizemat 4030
optimizematcoeff 2411
optimizenode 9791525
optimizeseq 3837
optimizevec 2497984
pack_localvars 25
pari_close_compiler 880
pari_init_compiler 892
pari_translate_string 0
parseproto 4437859
push_frame 125
snm_closure 0
str_defproto 25
strntoGENexp 734110
strtoclosure 5
strtofunction 0
translate 734110
var_push 30040
vec_optimize 2533871

Generated by: LCOV version 1.9