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.16.2 lcov report (development 29419-8afb0ed749) Lines: 1609 1767 91.1 %
Date: 2024-07-02 09:03:41 Functions: 88 90 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
closure_deriv 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 399
compilestate_reset 431
compilenewptr 819
compilelvalue 1792
strtoclosure 1820
op_insert_loc 2926
compilemy 3217
countvar 3245
is_node_zero 3966
ctxmvar 9319
compilemat 9457
optimizemat 9457
closurefunc 10139
localvars_read_str 10992
compilematcoeff 12588
optimizematcoeff 13561
compileseq 14253
optimizeseq 14253
matindex_type 14660
getclosure 19517
checkdups 19745
compilefuncinline 19772
compilecall 22542
optimizecall 22549
fetch_member_raw 24801
compilestore 41452
getlvalue 44768
cattovec 45594
compilestate_restore 48590
var_push 63564
getvar 76891
access_push 108152
addcopy 252565
pari_close_compiler 322575
pari_init_compiler 324340
getentry 339726
detag 403083
strntoGENexp 879688
translate 879692
gp_closure 928392
compilestate_save 1415041
data_push 1756684
compilevec 4460812
optimizevec 4461964
vec_optimize 4555239
optimizefunc 4652663
compilefunc 4657182
getmvar 5000620
compilecast 6639058
snm_closure 7935561
genclosurectx 7937168
genclosure 7947523
genctx 7951782
frame_push 7961012
getfunction 8896265
getcodepos 8896295
first_safe_arg 9366602
getfunc 9685537
gcopyunclone 9717683
compilesmall 11083007
get_ret_type 13521070
compilecast_loc 14578032
countlisttogen 18414840
listtogen 18414840
compilenode 18563717
optimizenode 22429895
op_push 38446635
is_func_named 51184377
op_push_loc 75478441
parseproto 120322376

Generated by: LCOV version 1.16