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 20296-0a10b35) Lines: 1327 1489 89.1 %
Date: 2017-02-26 05:50:47 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 30834
checkdups 13715
closure_deriv 56
closurefunc 8042
compilecall 16957
compilecast 5380806
compilecast_loc 5410179
compilefunc 2639915
compilefuncinline 15173
compilelambda 22
compilelocal 7
compilelvalue 959
compilemat 7266
compilematcoeff 6500
compilemy 1734
compilenewptr 448
compilenode 13209864
compileseq 7649
compilesmall 6762036
compilestate_reset 217
compilestate_restore 31029
compilestate_save 1321226
compilestore 22368
compileuninline 4
compilevec 3793120
copyifclone 146842
countlisttogen 12998067
countvar 1741
ctxmvar 6869
data_push 1786821
debug_context 0
detag 233002
fetch_member_raw 20398
first_safe_arg 5318336
frame_push 45477
genclosure 36056
genclosurectx 28005
get_ret_type 3341492
getclosure 15207
getcodepos 136274
getentry 199469
getfunc 5501114
getfunction 136260
getlvalue 23964
getmvar 195546
getvar 44585
gp_closure 84769
is_func_named 21107224
is_node_zero 2149
listtogen 12997927
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 7571
op_insert_loc 1638
op_push 28520423
op_push_loc 29424317
optimizecall 16964
optimizefunc 2635017
optimizemat 7266
optimizematcoeff 6997
optimizenode 15242393
optimizeseq 7642
optimizevec 3793470
pack_localvars 35
pari_close_compiler 64564
pari_init_compiler 64102
pari_translate_string 0
parseproto 7903416
push_frame 231
snm_closure 2215
str_defproto 7
strntoGENexp 1107991
strtoclosure 25799
strtofunction 7
translate 1107991
var_push 51471
vec_optimize 3863659

Generated by: LCOV version 1.11