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 19361-ac4f238) Lines: 1327 1489 89.1 %
Date: 2016-08-28 06:11:39 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 29876
checkdups 12707
closure_deriv 49
closurefunc 7757
compilecall 16005
compilecast 5353126
compilecast_loc 5470599
compilefunc 2624785
compilefuncinline 14151
compilelambda 22
compilelocal 7
compilelvalue 959
compilemat 7084
compilematcoeff 6157
compilemy 1601
compilenewptr 448
compilenode 13165600
compileseq 7061
compilesmall 6744639
compilestate_reset 161
compilestate_restore 30126
compilestate_save 1315127
compilestore 20891
compileuninline 4
compilevec 3790999
copyifclone 139191
countlisttogen 12957739
countvar 1608
ctxmvar 6722
data_push 1785096
debug_context 0
detag 220208
fetch_member_raw 19936
first_safe_arg 5285976
frame_push 132821
genclosure 124116
genclosurectx 116350
get_ret_type 3401829
getclosure 14185
getcodepos 218167
getentry 188607
getfunc 5458196
getfunction 218160
getlvalue 22445
getmvar 185181
getvar 41659
gp_closure 79738
is_func_named 20986828
is_node_zero 2079
listtogen 12957620
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 7228
op_insert_loc 1638
op_push 28466374
op_push_loc 29795980
optimizecall 16012
optimizefunc 2619864
optimizemat 7084
optimizematcoeff 6654
optimizenode 15192265
optimizeseq 7054
optimizevec 3791300
pack_localvars 35
pari_close_compiler 211741
pari_init_compiler 211637
pari_translate_string 0
parseproto 9137862
push_frame 175
snm_closure 2152
str_defproto 35
strntoGENexp 1107860
strtoclosure 114207
strtofunction 7
translate 1107860
var_push 50323
vec_optimize 3858749

Generated by: LCOV version 1.11