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-bordeaux1.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 17931-6d987be) Lines: 1283 1442 89.0 %
Date: 2015-07-29 Functions: 75 79 94.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 699 886 78.9 %

Function Name Sort by function name Hit count Sort by hit count
cattovec 32116
checkdups 32302
closure_deriv 49
closurefunc 11337
compilecall 14703
compilecast 5270220
compilecast_loc 5271363
compilefunc 2650497
compilefuncinline 34087
compilelambda 18
compilelocal 7
compilelvalue 847
compilemat 6916
compilematcoeff 7496
compilemy 1263
compilenewptr 385
compilenode 13169440
compileseq 13197
compilesmall 6875540
compilestate_reset 133
compilestate_restore 72532
compilestate_save 1368569
compilestore 18750
compileuninline 4
compilevec 3769028
copyifclone 155555
countlisttogen 12968453
countvar 1270
ctxmvar 6123
data_push 1646911
debug_context 0
detag 262318
fetch_member_raw 18865
first_safe_arg 5334278
frame_push 36019
genclosure 11408
genclosurectx 69
get_ret_type 3345173
getclosure 34125
getcodepos 170089
getentry 234850
getfunc 5546078
getfunction 170082
getlvalue 20057
getmvar 201428
getvar 67958
gp_closure 128649
is_func_named 21216064
is_node_zero 1704
listtogen 12968383
localpush 42
localvars_find 7
localvars_read_str 9793
matchQ 0
matindex_type 8483
op_insert_loc 1624
op_push 28292646
op_push_loc 29092068
optimizecall 14710
optimizefunc 2642031
optimizemat 6916
optimizematcoeff 7958
optimizenode 15190445
optimizeseq 13197
optimizevec 3769210
pack_localvars 35
pari_close_compiler 1780
pari_init_compiler 3296
pari_translate_string 0
parseproto 7833946
push_frame 175
snm_closure 58
str_defproto 35
strntoGENexp 1111839
strtoclosure 13
strtofunction 0
translate 1111839
var_push 68330
vec_optimize 3836077

Generated by: LCOV version 1.9