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.18.0 lcov report (development 29712-7c8a932571) Lines: 1608 1779 90.4 %
Date: 2024-11-15 09:08:45 Functions: 88 91 96.7 %
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 112758
addcopy 261665
call0 21
cattovec 47106
checkdups 20179
closure_deriv 0
closure_derivn 105
closurefunc 10195
closuretoinl 0
compilecall 22752
compilecast 6664133
compilecast_loc 14652622
compileexport 41
compilefunc 4669257
compilefuncinline 20178
compilelambda 339
compilelocal 28
compilelvalue 1806
compilemat 9590
compilematcoeff 13120
compilemy 3294
compilenewptr 826
compilenode 18596498
compileseq 14568
compilesmall 11090027
compilestate_reset 438
compilestate_restore 49010
compilestate_save 1418810
compilestore 43832
compileunexport 6
compileuninline 6
compilevec 4461981
countlisttogen 18443365
countmatrixelts 406
countvar 3322
ctxmvar 9424
data_push 1757616
debug_context 0
detag 418553
fetch_member_raw 25137
first_safe_arg 9391186
frame_push 8010994
gcopyunclone 9768627
genclosure 7997127
genclosurectx 7986728
genctx 8001682
get_ret_type 13593883
getclosure 19923
getcodepos 8949663
getentry 352655
getfunc 9722952
getfunction 8949573
getlvalue 47302
getmvar 5024756
getvar 80664
getvardyn 131
gp_closure 931675
is_func_named 51316495
is_node_zero 3980
listtogen 18443365
localpush 70
localvars_find 7
localvars_read_str 10992
matchQ 8
matindex_type 15206
op_insert_loc 2940
op_push 38479598
op_push_loc 75772482
optimizecall 22759
optimizefunc 4664703
optimizemat 9590
optimizematcoeff 14100
optimizenode 22468346
optimizeseq 14568
optimizevec 4463168
pack_localvars 53
pari_close_compiler 325084
pari_init_compiler 326279
pari_translate_string 4
parseproto 121137361
push_frame 259
snm_closure 7985109
str_defproto 91
strntoGENexp 880066
strtoclosure 1820
strtofunction 119
translate 880070
var_push 64600
vec_optimize 4557801

Generated by: LCOV version 1.16