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 29806-4d001396c7) Lines: 1608 1779 90.4 %
Date: 2024-12-22 09:08:28 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 9438
compilemat 9604
optimizemat 9604
closurefunc 10279
localvars_read_str 10992
compilematcoeff 13134
optimizematcoeff 14114
compileseq 14631
optimizeseq 14631
matindex_type 15220
getclosure 19951
checkdups 20193
compilefuncinline 20206
compilecall 22787
optimizecall 22794
fetch_member_raw 25137
compilestore 43972
cattovec 47204
getlvalue 47442
compilestate_restore 49080
var_push 64621
getvar 80825
access_push 112842
addcopy 262519
pari_close_compiler 325267
pari_init_compiler 326294
getentry 353754
detag 419792
strntoGENexp 880087
translate 880091
gp_closure 932060
compilestate_save 1419273
data_push 1757623
compilevec 4462191
optimizevec 4463378
vec_optimize 4558158
optimizefunc 4665998
compilefunc 4670615
getmvar 5027178
compilecast 6666779
snm_closure 7985320
genclosurectx 7986925
genclosure 7997426
genctx 8001900
frame_push 8011214
getfunction 8950220
getcodepos 8950289
first_safe_arg 9394014
getfunc 9726690
gcopyunclone 9768823
compilesmall 11090860
get_ret_type 13596609
compilecast_loc 14655488
countlisttogen 18446753
listtogen 18446753
compilenode 18599900
optimizenode 22472196
op_push 38483252
is_func_named 51331209
op_push_loc 75778204
parseproto 121147422

Generated by: LCOV version 1.16