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 23499-f2b23893a) Lines: 1060 1432 74.0 %
Date: 2019-01-22 05:42:35 Functions: 101 120 84.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_bitprecision0 560
_prec 10731
_precision0 3486
bincopy_relink 0
bitprecision0 28
bitprecision00 588
break0 70319
change_compo 9697114
changelex 158232926
changevalue 29065487
check_array_index 102706940
checkprec 10659
checkvalue 112164601
checkvalueptr 23111557
closure_callgen1 228935
closure_callgen1prec 60616
closure_callgen2 89929
closure_callgenall 4
closure_callgenvec 981788
closure_callgenvecprec 189
closure_callvoid1 0
closure_castgen 90655362
closure_castlong 5467
closure_context 84
closure_disassemble 0
closure_err 9141
closure_eval 190940918
closure_evalbrk 161
closure_evalgen 23143709
closure_evalnobrk 32669776
closure_evalres 96717
closure_evalvoid 99128996
closure_func_err 9642
closure_relink 0
closure_return 35976358
closure_returnupto 1359672
closure_trapgen 35
closure_unlink 0
closure_varn 1130730
copybin_unlink 0
copylex 9746275
copyupto 23408345
copyvalue 738052
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 291
evalstate_restore 43678
evalstate_restore_err 34425
evalstate_save 1370346
freeep 27366
freelex 148586364
gen_relink 0
gen_unlink 0
get_arg_name 21
get_lex 46458855
get_localbitprec 14319310
get_localprec 14301748
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 7690783
gp_evalbool 167832
gp_evalprec 19145
gp_evalupto 577514
gp_evalvoid 3654644
gp_evalvoid2 2935
hash_from_link 0
localbitprec 2660
localprec 8008
loop_break 92671366
lvar_make_safe 0
new_ptr 58405198
new_val_cell 13366
next0 20349
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 48
parfor0 48
parfor_worker 3500
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 117210
pari_init_evaluator 119518
pari_self 35
parsum 4
parvector 4
parvector_worker 19524
pop_lex 5506283
pop_localprec 80958
pop_val 13128
pop_val_if_newer 201723
precision0 35
precision00 3521
ptr_proplock 9902109
push_lex 5645516
push_localbitprec 91591
push_localprec 80958
pushlex 60674451
pushvalue 28
reset_break 98117
restore_trace 43678
restore_vars 191003631
return0 53381
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 40366137
st_alloc 2303158416
trace_push 196231504
zerovalue 14

Generated by: LCOV version 1.13