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.12.0 lcov report (development 23694-b3ccec097) Lines: 1079 1455 74.2 %
Date: 2019-03-20 05:44:21 Functions: 102 121 84.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_bitprecision0 580
_prec 10740
_precision0 3486
bincopy_relink 0
bitprecision0 28
bitprecision00 608
break0 70326
change_compo 9697177
changelex 158234255
changevalue 29066142
check_array_index 102713814
checkprec 10668
checkvalue 112167778
checkvalueptr 23111781
closure_callgen1 230376
closure_callgen1prec 60616
closure_callgen2 89929
closure_callgenall 4
closure_callgenvec 1003471
closure_callgenvecprec 322
closure_callvoid1 0
closure_castgen 90662206
closure_castlong 5467
closure_context 84
closure_disassemble 0
closure_err 9229
closure_eval 189732248
closure_evalbrk 161
closure_evalgen 23143971
closure_evalnobrk 32726017
closure_evalres 97757
closure_evalvoid 97834006
closure_func_err 9751
closure_relink 0
closure_return 36002055
closure_returnupto 1380480
closure_trapgen 35
closure_unlink 0
closure_varn 1130961
copybin_unlink 0
copylex 9768584
copyupto 23431484
copyvalue 738080
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 298
evalstate_restore 43787
evalstate_restore_err 34439
evalstate_save 1371723
freeep 27714
freelex 148666571
gen_relink 0
gen_unlink 0
get_arg_name 21
get_lex 45362224
get_localbitprec 14465874
get_localprec 14326508
get_next_label 182
getlocalbitprec 14
getlocalprec 14
gp_call 19215
gp_call2 91
gp_callbool 4704
gp_callprec 7413
gp_callvoid 0
gp_eval 7694787
gp_evalbool 167832
gp_evalprec 19145
gp_evalupto 577514
gp_evalvoid 3654644
gp_evalvoid2 2940
hash_from_link 0
localbitprec 2669
localprec 8008
loop_break 91563283
lvar_make_safe 0
new_ptr 58405658
new_val_cell 13573
next0 20349
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 3469
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 121009
pari_init_evaluator 123211
pari_self 35
parsum 4
parvector 6
parvector_worker 17393
pop_lex 5510534
pop_localprec 81105
pop_val 13335
pop_val_if_newer 203807
precision0 35
precision00 3521
ptr_proplock 9902158
push_lex 5649808
push_localbitprec 213270
push_localprec 81105
pushlex 60683513
pushvalue 28
reset_break 98233
restore_trace 43787
restore_vars 189830563
return0 53380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 40448595
setreflex 259
st_alloc 2299792262
trace_push 195154784
zerovalue 14

Generated by: LCOV version 1.13