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.10.0 lcov report (development 21921-ca7d0c8) Lines: 1343 1493 90.0 %
Date: 2018-02-20 06:16:13 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
debug_context 0
matchQ 0
pari_translate_string 0
compilelocal 7
localvars_find 7
strtofunction 7
compileuninline 12
call0 21
pack_localvars 35
str_defproto 39
localpush 42
compilelambda 66
closure_deriv 70
push_frame 231
compilestate_reset 270
compilenewptr 504
compilelvalue 1092
op_insert_loc 1673
compilemy 2171
countvar 2178
is_node_zero 2611
closurefunc 6930
ctxmvar 7514
compilemat 8057
optimizemat 8057
compilematcoeff 8809
optimizematcoeff 9397
compileseq 9899
optimizeseq 9899
matindex_type 10055
localvars_read_str 10738
checkdups 13984
getclosure 14563
compilefuncinline 14566
compilecall 18660
optimizecall 18667
snm_closure 18824
fetch_member_raw 22015
compilestore 27361
getlvalue 29293
cattovec 34662
compilestate_restore 42892
getvar 51566
var_push 54494
gp_closure 88605
pari_init_compiler 90332
pari_close_compiler 90401
addcopy 166984
strtoclosure 209336
getmvar 221601
getentry 225480
genclosurectx 228147
genclosure 235090
frame_push 245996
detag 266869
getfunction 340372
getcodepos 340386
strntoGENexp 1107320
translate 1107320
compilestate_save 1360607
data_push 1788451
optimizefunc 2681260
compilefunc 2684161
get_ret_type 3605627
compilevec 3803326
optimizevec 3804005
vec_optimize 3880471
first_safe_arg 5410752
compilecast 5434584
getfunc 5622233
compilecast_loc 5664218
compilesmall 6819262
parseproto 10367703
listtogen 13123222
countlisttogen 13123460
compilenode 13331369
optimizenode 15402086
is_func_named 24138099
op_push 28710404
op_push_loc 30411950

Generated by: LCOV version 1.11