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 20704-afbaa81) Lines: 1334 1489 89.6 %
Date: 2017-05-26 05:56:59 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 31098
checkdups 12269
closure_deriv 56
closurefunc 6398
compilecall 17106
compilecast 5372272
compilecast_loc 5406352
compilefunc 2654507
compilefuncinline 12690
compilelambda 66
compilelocal 7
compilelvalue 973
compilemat 7287
compilematcoeff 6933
compilemy 1884
compilenewptr 455
compilenode 13241968
compileseq 8044
compilesmall 6791450
compilestate_reset 207
compilestate_restore 22410
compilestate_save 1313491
compilestore 23315
compileuninline 12
compilevec 3799554
copyifclone 149036
countlisttogen 13043896
countvar 1891
ctxmvar 7024
data_push 1784530
debug_context 0
detag 235089
fetch_member_raw 20685
first_safe_arg 5347972
frame_push 48783
genclosure 39088
genclosurectx 32677
get_ret_type 3352941
getclosure 12680
getcodepos 132225
getentry 199881
getfunc 5534771
getfunction 132211
getlvalue 24967
getmvar 197248
getvar 44447
gp_closure 78385
is_func_named 21222967
is_node_zero 2240
listtogen 13043707
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 8018
op_insert_loc 1666
op_push 28611324
op_push_loc 29529370
optimizecall 17113
optimizefunc 2651697
optimizemat 7287
optimizematcoeff 7451
optimizenode 15298483
optimizeseq 8044
optimizevec 3799995
pack_localvars 35
pari_close_compiler 31978
pari_init_compiler 31915
pari_translate_string 0
parseproto 7944642
push_frame 231
snm_closure 2343
str_defproto 39
strntoGENexp 1106364
strtoclosure 30347
strtofunction 7
translate 1106364
var_push 50252
vec_optimize 3870850

Generated by: LCOV version 1.11