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 - eval.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29712-7c8a932571) Lines: 1298 1884 68.9 %
Date: 2024-11-15 09:08:45 Functions: 116 154 75.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
closure_callgenvecprec 0
closure_callvoid1 0
closure_disassemble 0
closure_relink 0
closure_unlink 0
disassemble_cast 0
err_var 0
evalstate_clone 0
gen_relink 0
gp_callvoid 0
hash_from_link 0
lvar_make_safe 0
negcmp 0
opcode_need_relink 0
parfor_init 0
parfor_next 0
parfor_stop 0
parforeach_init 0
parforeach_next 0
parforeach_stop 0
parforiter_init 0
parforiter_next 0
parforiter_stop 0
parforprime_init 0
parforprime_next 0
parforprime_stop 0
parforprimestep_init 0
parforstep_init 0
parforstep_next 0
parforstep_stop 0
parforvec_init 0
parforvec_next 0
parforvec_stop 0
safeel 0
safegcoeff 0
safegel 0
safelistel 0
pareval 6
closure_callgen0 7
parforeach 7
parforeach0 7
parforprimestep0 7
closure_callgenall 12
copybin_unlink 12
pareval_worker 12
parforprime 13
parforprime0 13
getlocalprec 14
zerovalue 14
gen_unlink 16
evalstate_set_trace 18
parforprimestep 20
get_arg_name 21
parvector 31
parforstep 39
parforstep0 39
parforvec 39
parforvec0 39
pari_self 41
precision0 42
pushvalue 42
closure_context 91
gp_call2 91
closure_callgen0prec 168
closure_evalbrk 175
get_next_label 245
closure_callgenvecdef 322
closure_callgenvecdefprec 322
parfor 346
parfor0 346
evalstate_reset 438
setreflex 504
parvector_worker 631
_bitprecision0 676
bitprecision00 718
bitprecision0 1225
_precision0 1246
precision00 1288
parsum 2034
localbitprec 3324
getlocalbitprec 3346
closure_castlong 5873
parsum_slice_worker 7474
localprec 7847
gp_evalvoid2 8455
parfor_worker 9632
checkprec 11162
_prec 11255
closure_err 12580
closure_func_err 13277
pop_val 18124
new_val_cell 18565
gp_evalprec 20734
gp_callprec 23478
next0 25853
freeep 35118
evalstate_restore_err 36243
return0 40897
get_and_reset_break 41666
evalstate_restore 48982
closure_callgen2 67073
break0 70358
closure_callgen1prec 76681
reset_break 91086
pop_localprec 98976
push_localprec 99025
gp_call 112134
pari_close_evaluator 322110
pari_init_evaluator 326183
pop_val_if_newer 391407
push_localbitprec 434395
copyvalue 745360
gp_callbool 872130
evalstate_get_trace 910944
closure_evalres 931458
closure_varn 1139072
evalstate_save 1418810
gp_evalupto 2052195
gp_evalvoid 3693816
closure_callgenvec 4486619
pop_lex 5595581
restore_trace 5644563
push_lex 5762947
closure_callgen1 8562317
change_compo 9701405
copylex 9790697
ptr_proplock 9906309
closure_returnupto 13193149
get_localprec 21897950
get_localbitprec 22251333
checkvalueptr 23308327
gp_evalbool 26165027
changevalue 29488333
closure_evalgen 34037775
gp_eval 39688178
copyupto 40973130
closure_return 49566205
new_ptr 58684361
pushlex 63471643
closure_evalnobrk 76015533
set_lex 83224189
closure_castgen 92909506
get_lex 98812763
check_array_index 106145174
checkvalue 123276585
loop_break 145762380
closure_evalvoid 152226246
changelex 161835172
freelex 180580339
closure_eval 311874155
restore_vars 311893056
trace_push 317393989
st_alloc 2971448335

Generated by: LCOV version 1.16