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 21351-66b5338) Lines: 1343 1493 90.0 %
Date: 2017-11-22 06:21:08 Functions: 77 80 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addcopy 162350
call0 21
cattovec 33926
checkdups 13564
closure_deriv 56
closurefunc 6706
compilecall 18261
compilecast 5417972
compilecast_loc 5634704
compilefunc 2675626
compilefuncinline 14160
compilelambda 66
compilelocal 7
compilelvalue 1043
compilemat 7756
compilematcoeff 8438
compilemy 2115
compilenewptr 490
compilenode 13307517
compileseq 9479
compilesmall 6811684
compilestate_reset 263
compilestate_restore 41954
compilestate_save 1356501
compilestore 26444
compileuninline 12
compilevec 3802431
countlisttogen 13101079
countvar 2122
ctxmvar 7388
data_push 1787368
debug_context 0
detag 259071
fetch_member_raw 20741
first_safe_arg 5392716
frame_push 232688
genclosure 221985
genclosurectx 215266
get_ret_type 3576516
getclosure 14157
getcodepos 323417
getentry 219019
getfunc 5598240
getfunction 323403
getlvalue 28299
getmvar 215357
getvar 49963
gp_closure 85084
is_func_named 24061823
is_node_zero 2583
listtogen 13100869
localpush 42
localvars_find 7
localvars_read_str 10108
matchQ 0
matindex_type 9593
op_insert_loc 1673
op_push 28684348
op_push_loc 30328612
optimizecall 18268
optimizefunc 2672844
optimizemat 7756
optimizematcoeff 8991
optimizenode 15374671
optimizeseq 9479
optimizevec 3803040
pack_localvars 35
pari_close_compiler 92674
pari_init_compiler 92755
pari_translate_string 0
parseproto 10174549
push_frame 231
snm_closure 16211
str_defproto 39
strntoGENexp 1107001
strtoclosure 199068
strtofunction 7
translate 1107001
var_push 52086
vec_optimize 3878060

Generated by: LCOV version 1.11