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.8.0 lcov report (development 19226-b907b8d) Lines: 1327 1489 89.1 %
Date: 2016-07-29 07:10:27 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
call0 21
cattovec 29806
checkdups 12607
closure_deriv 49
closurefunc 7736
compilecall 15942
compilecast 5089126
compilecast_loc 5202261
compilefunc 2542076
compilefuncinline 14058
compilelambda 20
compilelocal 7
compilelvalue 959
compilemat 7084
compilematcoeff 6108
compilemy 1601
compilenewptr 448
compilenode 12881106
compileseq 7033
compilesmall 6724250
compilestate_reset 161
compilestate_restore 30826
compilestate_save 1315238
compilestore 20779
compileuninline 4
compilevec 3760899
copyifclone 138566
countlisttogen 12731918
countvar 1608
ctxmvar 6671
data_push 1626818
debug_context 0
detag 219126
fetch_member_raw 19880
first_safe_arg 5120432
frame_push 128332
genclosure 119736
genclosurectx 111991
get_ret_type 3239839
getclosure 14094
getcodepos 212831
getentry 187672
getfunc 5291787
getfunction 212824
getlvalue 22326
getmvar 184346
getvar 41370
gp_closure 78882
is_func_named 20325161
is_node_zero 2072
listtogen 12731799
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 7179
op_insert_loc 1638
op_push 28017900
op_push_loc 29250637
optimizecall 15949
optimizefunc 2537197
optimizemat 7084
optimizematcoeff 6605
optimizenode 14899571
optimizeseq 7026
optimizevec 3761193
pack_localvars 35
pari_close_compiler 201766
pari_init_compiler 201828
pari_translate_string 0
parseproto 8755458
push_frame 175
snm_closure 2150
str_defproto 35
strntoGENexp 1107531
strtoclosure 109850
strtofunction 7
translate 1107531
var_push 50209
vec_optimize 3828537

Generated by: LCOV version 1.11