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 16937-4bd9b4e) Lines: 1221 1423 85.8 %
Date: 2014-10-24 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 18788
checkdups 6712
closure_deriv 7
closurefunc 4212
compilecall 8974
compilecast 4635152
compilecast_loc 4636111
compilefunc 2314400
compilefuncinline 7353
compilelambda 0
compilelocal 7
compilelvalue 483
compilemat 5642
compilematcoeff 2870
compilemy 756
compilenewptr 231
compilenode 11835163
compileseq 5107
compilesmall 6196901
compilestate_reset 105
compilestate_restore 20640
compilestate_save 1278709
compilestore 12068
compileuninline 0
compileuserfunc 8806
compilevec 3496592
copyifclone 83841
countlisttogen 11716872
countvar 763
ctxmvar 1582
data_push 1534300
debug_context 0
detag 128794
first_safe_arg 4641246
frame_push 6733
genclosure 4219
get_ret_type 2810905
getclosure 7409
getcodepos 62085
getentry 111455
getfunc 4752971
getfunction 62078
getlvalue 12978
getmvar 109837
getvar 23402
gp_closure 52128
is_func_named 18509652
is_node_zero 1029
listtogen 11716802
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 3395
op_insert_loc 1477
op_push 25926102
op_push_loc 26459561
optimizecall 8981
optimizefunc 2312757
optimizemat 5642
optimizematcoeff 3122
optimizenode 13687220
optimizeseq 5107
optimizevec 3496732
pack_localvars 35
pari_close_compiler 1189
pari_init_compiler 1201
pari_translate_string 0
parseproto 6171166
push_frame 175
snm_closure 0
str_defproto 35
strntoGENexp 1026737
strtoclosure 7
strtofunction 0
translate 1026737
var_push 41215
vec_optimize 3546166

Generated by: LCOV version 1.9