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 to exceed 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.16.2 lcov report (development 29451-c474da952c) Lines: 1607 1767 90.9 %
Date: 2024-07-16 09:03:37 Functions: 88 90 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
L_compile_err 7
U_compile_err 7
access_push 108159
addcopy 252509
call0 21
cattovec 45594
checkdups 19752
closure_deriv 0
closure_derivn 105
closurefunc 10139
compilecall 22542
compilecast 6638750
compilecast_loc 14578327
compileexport 41
compilefunc 4657147
compilefuncinline 19779
compilelambda 339
compilelocal 28
compilelvalue 1792
compilemat 9457
compilematcoeff 12588
compilemy 3217
compilenewptr 819
compilenode 18563577
compileseq 14316
compilesmall 11083014
compilestate_reset 431
compilestate_restore 48590
compilestate_save 1414929
compilestore 41438
compileunexport 6
compileuninline 6
compilevec 4460805
countlisttogen 18414882
countmatrixelts 399
countvar 3245
ctxmvar 9319
data_push 1756691
debug_context 0
detag 403013
fetch_member_raw 24801
first_safe_arg 9366532
frame_push 7961637
gcopyunclone 9718322
genclosure 7948093
genclosurectx 7937771
genctx 7952415
get_ret_type 13521480
getclosure 19524
getcodepos 8896793
getentry 339670
getfunc 9685411
getfunction 8896768
getlvalue 44754
getmvar 5000515
getvar 76891
getvardyn 131
gp_closure 928287
is_func_named 51183999
is_node_zero 3966
listtogen 18414882
localpush 70
localvars_find 7
localvars_read_str 10992
matchQ 8
matindex_type 14660
op_insert_loc 2926
op_push 38446355
op_push_loc 75478288
optimizecall 22549
optimizefunc 4652628
optimizemat 9457
optimizematcoeff 13561
optimizenode 22429839
optimizeseq 14316
optimizevec 4461957
pack_localvars 53
pari_close_compiler 323212
pari_init_compiler 324398
pari_translate_string 4
parseproto 120322794
push_frame 259
snm_closure 7936149
str_defproto 91
strntoGENexp 879688
strtoclosure 1820
strtofunction 119
translate 879692
var_push 63571
vec_optimize 4555246

Generated by: LCOV version 1.16