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 23348-5caea72e3) Lines: 1060 1432 74.0 %
Date: 2018-12-14 05:41:32 Functions: 101 120 84.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 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
parsum 4
parvector 4
parforvec 6
parforvec0 6
getlocalbitprec 14
getlocalprec 14
zerovalue 14
get_arg_name 21
bitprecision0 28
pushvalue 28
closure_trapgen 35
pari_self 35
precision0 35
parfor 44
parfor0 44
closure_context 84
gp_call2 91
closure_callgenvecprec 147
closure_evalbrk 161
get_next_label 182
evalstate_reset 291
_bitprecision0 560
bitprecision00 588
gp_callbool 672
gp_evalvoid2 2510
localbitprec 2660
parfor_worker 2998
_precision0 3486
precision00 3521
closure_castlong 5467
gp_callprec 7413
localprec 8008
closure_err 9078
closure_func_err 9579
checkprec 10659
_prec 10731
pop_val 13098
new_val_cell 13329
gp_evalprec 19145
gp_call 19187
next0 20349
parvector_worker 20373
freeep 27336
evalstate_restore_err 34348
evalstate_restore 43538
restore_trace 43538
return0 53380
closure_callgen1prec 60616
break0 70319
pop_localprec 80916
push_localprec 80916
closure_callgen2 89929
push_localbitprec 91549
closure_evalres 96348
reset_break 97975
pari_close_evaluator 116893
pari_init_evaluator 118983
gp_evalbool 167832
pop_val_if_newer 200351
closure_callgen1 221069
gp_evalupto 577514
copyvalue 738052
closure_callgenvec 973572
closure_varn 1130681
closure_returnupto 1344834
evalstate_save 1369891
gp_evalvoid 3654644
pop_lex 5505734
push_lex 5644543
gp_eval 7690433
change_compo 9697114
copylex 9746275
ptr_proplock 9902109
get_localprec 14293146
get_localbitprec 14310691
checkvalueptr 23111536
closure_evalgen 23143586
copyupto 23396058
changevalue 29065399
closure_evalnobrk 32669424
closure_return 35960628
set_lex 40365731
get_lex 45406890
new_ptr 58405175
pushlex 60664115
closure_castgen 90654867
loop_break 91603858
closure_evalvoid 97909529
check_array_index 102706445
checkvalue 112164072
freelex 148567457
changelex 158233013
closure_eval 189698996
restore_vars 189782739
trace_push 195092343
st_alloc 2299247805

Generated by: LCOV version 1.13