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 18889-ac2cbba) Lines: 1298 1456 89.1 %
Date: 2016-05-01 Functions: 77 80 96.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 705 894 78.9 %

Function Name Sort by function name Hit count Sort by hit count
call0 21
cattovec 33684
checkdups 33484
closure_deriv 49
closurefunc 11740
compilecall 15613
compilecast 6082628
compilecast_loc 6188265
compilefunc 3061295
compilefuncinline 35026
compilelambda 20
compilelocal 7
compilelvalue 917
compilemat 7070
compilematcoeff 8049
compilemy 1510
compilenewptr 420
compilenode 15502792
compileseq 13929
compilesmall 8183442
compilestate_reset 161
compilestate_restore 73134
compilestate_save 1376002
compilestore 21326
compileuninline 4
compilevec 4532161
copyifclone 167514
countlisttogen 15321282
countvar 1517
ctxmvar 6580
data_push 1864043
debug_context 0
detag 283457
fetch_member_raw 19838
first_safe_arg 6158044
frame_push 141697
genclosure 116249
genclosurectx 104500
get_ret_type 3888700
getclosure 35062
getcodepos 282188
getentry 251876
getfunc 6385665
getfunction 282181
getlvalue 22817
getmvar 217460
getvar 72622
gp_closure 134860
is_func_named 24500595
is_node_zero 1988
listtogen 15321170
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 9106
op_insert_loc 1624
op_push 33638725
op_push_loc 34998543
optimizecall 15620
optimizefunc 3052321
optimizemat 7070
optimizematcoeff 8532
optimizenode 17911037
optimizeseq 13922
optimizevec 4532434
pack_localvars 35
pari_close_compiler 1836
pari_init_compiler 194644
pari_translate_string 0
parseproto 10358030
push_frame 175
snm_closure 613
str_defproto 35
strntoGENexp 1327159
strtoclosure 103896
strtofunction 7
translate 1327159
var_push 70939
vec_optimize 4602089

Generated by: LCOV version 1.9