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 29877-9124a6ce27) Lines: 1608 1779 90.4 %
Date: 2025-01-18 09:08:44 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 3301
countvar 3329
is_node_zero 3987
ctxmvar 9445
compilemat 9611
optimizemat 9611
closurefunc 10307
localvars_read_str 10992
compilematcoeff 13155
optimizematcoeff 14142
compileseq 14687
optimizeseq 14687
matindex_type 15255
getclosure 20000
checkdups 20249
compilefuncinline 20255
compilecall 22850
optimizecall 22857
fetch_member_raw 25137
compilestore 44343
cattovec 47442
getlvalue 47820
compilestate_restore 56122
var_push 64698
getvar 81315
access_push 113178
addcopy 264052
pari_close_compiler 333476
pari_init_compiler 334441
getentry 355805
detag 422263
strntoGENexp 880150
translate 880154
gp_closure 932648
compilestate_save 1426914
data_push 1757772
compilevec 4462415
optimizevec 4463602
vec_optimize 4558627
optimizefunc 4668497
compilefunc 4673142
getmvar 5031742
compilecast 6671611
snm_closure 8004528
genclosurectx 8006156
genclosure 8016665
genctx 8021124
frame_push 8030499
getfunction 8970121
getcodepos 8970166
first_safe_arg 9399194
getfunc 9733865
gcopyunclone 9788258
compilesmall 11092951
get_ret_type 13620645
compilecast_loc 14679580
countlisttogen 18452598
listtogen 18452598
compilenode 18606718
optimizenode 22479931
op_push 38490812
is_func_named 51358992
op_push_loc 75961195
parseproto 121680550

Generated by: LCOV version 1.16