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 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.10.0 lcov report (development 22344-f2bf0a3) Lines: 1053 1394 75.5 %
Date: 2018-04-25 06:16:49 Functions: 93 110 84.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70323
change_compo 9693712
changelex 163470174
changevalue 29059244
check_array_index 102612349
checkvalue 111832721
checkvalueptr 23111473
closure_callgen1 257742
closure_callgen1prec 56626
closure_callgen2 89929
closure_callgenall 12
closure_callgenvec 956947
closure_callgenvecprec 147
closure_callvoid1 0
closure_castgen 90576760
closure_castlong 5467
closure_context 84
closure_disassemble 0
closure_err 8544
closure_eval 229257477
closure_evalbrk 161
closure_evalgen 23656189
closure_evalnobrk 34125922
closure_evalres 90296
closure_evalvoid 135634258
closure_func_err 9010
closure_relink 0
closure_return 35945851
closure_returnupto 1360869
closure_trapgen 35
closure_unlink 0
closure_varn 1000488
copybin_unlink 8
copylex 9742768
copyupto 20587745
copyvalue 737989
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 270
evalstate_restore 43072
evalstate_restore_err 34444
evalstate_save 1362436
freeep 26572
freelex 148355158
gen_relink 0
gen_unlink 12
get_arg_name 21
get_lex 82445543
get_localbitprec 14274684
get_localprec 14257365
get_next_label 182
gp_call 18956
gp_call2 91
gp_callbool 672
gp_callprec 3423
gp_callvoid 0
gp_eval 7688655
gp_evalbool 167426
gp_evalprec 19040
gp_evalupto 576247
gp_evalvoid 3654644
gp_evalvoid2 4039
hash_from_link 0
localbitprec 98
localprec 7959
loop_break 129169443
lvar_make_safe 0
new_ptr 60616218
new_val_cell 12672
next0 20349
opcode_need_relink 0
pareval 6
pareval_worker 12
parfor 142
parfor0 142
parfor_worker 5217
parforprime 6
parforprime0 6
parforvec 18
parforvec0 18
pari_close_evaluator 90542
pari_init_evaluator 90113
pari_self 35
parsum 6
parvector 12
parvector_worker 60296
pop_lex 5360068
pop_localprec 76821
pop_val 12476
pop_val_if_newer 179574
ptr_proplock 9898707
push_lex 5500368
push_localbitprec 98
push_localprec 84780
pushlex 60509837
pushvalue 28
reset_break 97315
restore_trace 43072
restore_vars 229444818
return0 53205
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 41317813
st_alloc 2397262328
trace_push 234351273
zerovalue 14

Generated by: LCOV version 1.11