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.1 lcov report (development 24014-841134d83) Lines: 1092 1479 73.8 %
Date: 2019-07-15 05:55:26 Functions: 104 124 83.9 %
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
copybin_unlink 0
disassemble_cast 0
err_var 0
evalstate_clone 0
gen_relink 0
gen_unlink 0
gp_callvoid 0
hash_from_link 0
lvar_make_safe 0
opcode_need_relink 0
safeel 0
safegcoeff 0
safegel 0
safelistel 0
pareval 2
parforprime 2
parforprime0 2
closure_callgenall 4
pareval_worker 4
parforvec 6
parforvec0 6
parsum 6
parvector 6
getlocalbitprec 14
getlocalprec 14
zerovalue 14
get_arg_name 21
pushvalue 28
bitprecision0 35
closure_trapgen 35
pari_self 35
precision0 35
parfor 48
parfor0 48
closure_context 84
gp_call2 91
closure_evalbrk 161
get_next_label 204
setreflex 259
evalstate_reset 305
closure_callgenvecdef 322
closure_callgenvecdefprec 322
_bitprecision0 580
bitprecision00 615
localbitprec 2676
gp_evalvoid2 2961
_precision0 3486
precision00 3521
parfor_worker 3524
gp_callbool 4704
closure_castlong 5467
gp_callprec 7413
localprec 8008
closure_err 9293
closure_func_err 9822
checkprec 10675
_prec 10754
pop_val 13503
new_val_cell 13741
gp_evalprec 19145
gp_call 19215
parvector_worker 19647
next0 20349
freeep 27966
evalstate_restore_err 34761
evalstate_restore 44180
restore_trace 44180
return0 53381
get_and_reset_break 54148
closure_callgen1prec 60616
break0 70326
pop_localprec 81105
push_localprec 81105
closure_callgen2 89929
reset_break 98633
closure_evalres 98708
gp_evalbool 167832
pop_val_if_newer 205322
pari_close_evaluator 424484
pari_init_evaluator 426814
push_localbitprec 516152
gp_evalupto 577535
copyvalue 738080
closure_varn 1131340
closure_callgenvec 1249941
evalstate_save 1373811
gp_evalvoid 3654644
pop_lex 5511022
push_lex 5650329
gp_eval 7667221
closure_callgen1 8774398
change_compo 9697177
copylex 9768584
ptr_proplock 9902158
closure_returnupto 10173618
get_localprec 14332261
get_localbitprec 14775867
checkvalueptr 23111788
closure_evalgen 23145244
changevalue 29066242
copyupto 32273022
closure_evalnobrk 32698775
set_lex 40421288
closure_return 44797524
get_lex 46246235
new_ptr 58405667
pushlex 60687494
closure_castgen 90665489
loop_break 92460604
closure_evalvoid 98954246
check_array_index 102717174
checkvalue 112171935
changelex 158235034
freelex 174804669
restore_vars 199606268
closure_eval 199638587
trace_push 204948983
st_alloc 2346962796

Generated by: LCOV version 1.13