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

Generated by: LCOV version 1.16