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.1 lcov report (development 29950-285c5b69ed) Lines: 1608 1779 90.4 %
Date: 2025-02-05 09:09:51 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 833
compilelvalue 1820
strtoclosure 1820
op_insert_loc 2975
compilemy 3315
countvar 3343
is_node_zero 4001
ctxmvar 9452
compilemat 9618
optimizemat 9618
closurefunc 10335
localvars_read_str 10992
compilematcoeff 13162
optimizematcoeff 14149
compileseq 14701
optimizeseq 14701
matindex_type 15262
getclosure 20014
compilefuncinline 20269
checkdups 20270
compilecall 22871
optimizecall 22878
fetch_member_raw 25137
compilestore 44378
cattovec 47526
getlvalue 47855
compilestate_restore 56115
var_push 64726
getvar 81378
access_push 113248
addcopy 264479
pari_close_compiler 334727
pari_init_compiler 335889
getentry 356323
detag 422872
strntoGENexp 880171
translate 880175
gp_closure 932851
compilestate_save 1427133
data_push 1757406
compilevec 4462471
optimizevec 4463658
vec_optimize 4558774
optimizefunc 4616606
compilefunc 4621279
getmvar 4980383
compilecast 6674457
snm_closure 8007576
genclosurectx 8009221
genclosure 8019731
genctx 8024193
frame_push 8033576
getfunction 8973367
getcodepos 8973456
first_safe_arg 9295510
getfunc 9630643
gcopyunclone 9790968
compilesmall 11096992
get_ret_type 13574462
compilecast_loc 14685448
countlisttogen 18349075
listtogen 18349075
compilenode 18613619
optimizenode 22432394
op_push 38495544
is_func_named 50788289
op_push_loc 75984589
parseproto 121637039

Generated by: LCOV version 1.16