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 17727-c4b959b) Lines: 1283 1442 89.0 %
Date: 2015-04-19 Functions: 75 79 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 699 886 78.9 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 31612
checkdups 31873
closure_deriv 28
closurefunc 11078
compilecall 14465
compilecast 5006524
compilecast_loc 5007608
compilefunc 2517002
compilefuncinline 33794
compilelambda 8
compilelocal 7
compilelvalue 833
compilemat 6902
compilematcoeff 7405
compilemy 1183
compilenewptr 378
compilenode 12402766
compileseq 12998
compilesmall 6444150
compilestate_reset 119
compilestate_restore 72476
compilestate_save 1367160
compilestore 18477
compileuninline 4
compilevec 3515337
copyifclone 153929
countlisttogen 12192927
countvar 1190
ctxmvar 5980
data_push 1574623
debug_context 0
detag 258970
fetch_member_raw 18837
first_safe_arg 5066644
frame_push 35577
genclosure 11146
genclosurectx 66
get_ret_type 3204524
getclosure 33842
getcodepos 168537
getentry 232128
getfunc 5276240
getfunction 168530
getlvalue 19753
getmvar 199015
getvar 67121
gp_closure 127603
is_func_named 20148492
is_node_zero 1627
listtogen 12192857
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 8378
op_insert_loc 1617
op_push 26524597
op_push_loc 27315947
optimizecall 14472
optimizefunc 2508655
optimizemat 6902
optimizematcoeff 7860
optimizenode 14296370
optimizeseq 12998
optimizevec 3515519
pack_localvars 35
pari_close_compiler 1759
pari_init_compiler 3120
pari_translate_string 0
parseproto 7537955
push_frame 175
snm_closure 48
str_defproto 63
strntoGENexp 1040201
strtoclosure 20
strtofunction 0
translate 1040201
var_push 67835
vec_optimize 3581620

Generated by: LCOV version 1.9