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
closure_deriv 0
closuretoinl 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 406
compilestate_reset 438
compilenewptr 826
compilelvalue 1806
strtoclosure 1820
op_insert_loc 2940
compilemy 3294
countvar 3322
is_node_zero 3980
ctxmvar 9424
compilemat 9590
optimizemat 9590
closurefunc 10195
localvars_read_str 10992
compilematcoeff 13120
optimizematcoeff 14100
compileseq 14568
optimizeseq 14568
matindex_type 15206
getclosure 19923
compilefuncinline 20178
checkdups 20179
compilecall 22752
optimizecall 22759
fetch_member_raw 25137
compilestore 43832
cattovec 47106
getlvalue 47302
compilestate_restore 49010
var_push 64600
getvar 80664
access_push 112758
addcopy 261665
pari_close_compiler 325084
pari_init_compiler 326279
getentry 352655
detag 418553
strntoGENexp 880066
translate 880070
gp_closure 931675
compilestate_save 1418810
data_push 1757616
compilevec 4461981
optimizevec 4463168
vec_optimize 4557801
optimizefunc 4664703
compilefunc 4669257
getmvar 5024756
compilecast 6664133
snm_closure 7985109
genclosurectx 7986728
genclosure 7997127
genctx 8001682
frame_push 8010994
getfunction 8949573
getcodepos 8949663
first_safe_arg 9391186
getfunc 9722952
gcopyunclone 9768627
compilesmall 11090027
get_ret_type 13593883
compilecast_loc 14652622
countlisttogen 18443365
listtogen 18443365
compilenode 18596498
optimizenode 22468346
op_push 38479598
is_func_named 51316495
op_push_loc 75772482
parseproto 121137361

Generated by: LCOV version 1.16