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 17577-e669ab5) Lines: 1283 1442 89.0 %
Date: 2015-03-01 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 31206
checkdups 31180
closure_deriv 7
closurefunc 10385
compilecall 14073
compilecast 4996373
compilecast_loc 4997422
compilefunc 2510982
compilefuncinline 33150
compilelambda 8
compilelocal 7
compilelvalue 707
compilemat 6888
compilematcoeff 7328
compilemy 1071
compilenewptr 315
compilenode 12388745
compileseq 12844
compilesmall 6440147
compilestate_reset 119
compilestate_restore 72413
compilestate_save 1365640
compilestore 18015
compileuninline 4
compilevec 3514847
copyifclone 151668
countlisttogen 12179046
countvar 1078
ctxmvar 5735
data_push 1573509
debug_context 0
detag 253335
fetch_member_raw 18823
first_safe_arg 5053694
frame_push 34863
genclosure 10446
genclosurectx 59
get_ret_type 3192932
getclosure 33198
getcodepos 166416
getentry 227648
getfunc 5260266
getfunction 166409
getlvalue 19144
getmvar 195081
getvar 65595
gp_closure 126427
is_func_named 20101228
is_node_zero 1515
listtogen 12178976
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 8175
op_insert_loc 1617
op_push 26510149
op_push_loc 27294849
optimizecall 14080
optimizefunc 2503258
optimizemat 6888
optimizematcoeff 7720
optimizenode 14280396
optimizeseq 12844
optimizevec 3515043
pack_localvars 35
pari_close_compiler 1738
pari_init_compiler 3099
pari_translate_string 0
parseproto 7504145
push_frame 175
snm_closure 48
str_defproto 35
strntoGENexp 1040061
strtoclosure 13
strtofunction 0
translate 1040061
var_push 67009
vec_optimize 3580297

Generated by: LCOV version 1.9