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 20838-243a3c2) Lines: 1334 1489 89.6 %
Date: 2017-07-28 06:22:09 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
call0 21
cattovec 31406
checkdups 12549
closure_deriv 56
closurefunc 6482
compilecall 17512
compilecast 5384542
compilecast_loc 5419688
compilefunc 2659708
compilefuncinline 12907
compilelambda 66
compilelocal 7
compilelvalue 973
compilemat 7308
compilematcoeff 7416
compilemy 1926
compilenewptr 455
compilenode 13259518
compileseq 8471
compilesmall 6797290
compilestate_reset 228
compilestate_restore 22473
compilestate_save 1316135
compilestore 24295
compileuninline 12
compilevec 3800884
copyifclone 152039
countlisttogen 13058960
countvar 1933
ctxmvar 7080
data_push 1784983
debug_context 0
detag 240815
fetch_member_raw 20685
first_safe_arg 5359298
frame_push 50087
genclosure 40196
genclosurectx 33701
get_ret_type 3364039
getclosure 12897
getcodepos 135881
getentry 204368
getfunc 5550444
getfunction 135867
getlvalue 25968
getmvar 201742
getvar 45847
gp_closure 80702
is_func_named 21264554
is_node_zero 2289
listtogen 13058771
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 8501
op_insert_loc 1666
op_push 28632618
op_push_loc 29565025
optimizecall 17519
optimizefunc 2656912
optimizemat 7308
optimizematcoeff 7934
optimizenode 15318923
optimizeseq 8471
optimizevec 3801367
pack_localvars 35
pari_close_compiler 33215
pari_init_compiler 33247
pari_translate_string 0
parseproto 7998182
push_frame 231
snm_closure 2693
str_defproto 39
strntoGENexp 1106413
strtoclosure 31021
strtofunction 7
translate 1106413
var_push 50546
vec_optimize 3872964

Generated by: LCOV version 1.11