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 23955-17de75d95) Lines: 1092 1479 73.8 %
Date: 2019-06-15 05:47:29 Functions: 104 124 83.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_bitprecision0 579
_prec 10754
_precision0 3486
bincopy_relink 0
bitprecision0 35
bitprecision00 614
break0 70326
change_compo 9697177
changelex 158234710
changevalue 29066536
check_array_index 102715532
checkprec 10675
checkvalue 112169931
checkvalueptr 23111788
closure_callgen1 8770162
closure_callgen1prec 60616
closure_callgen2 89929
closure_callgenall 4
closure_callgenvec 1227508
closure_callgenvecdef 322
closure_callgenvecdefprec 322
closure_callgenvecprec 0
closure_callvoid1 0
closure_castgen 90663838
closure_castlong 5467
closure_context 84
closure_disassemble 0
closure_err 9278
closure_eval 199664406
closure_evalbrk 161
closure_evalgen 23144041
closure_evalnobrk 32698775
closure_evalres 98429
closure_evalvoid 99026350
closure_func_err 9800
closure_relink 0
closure_return 44769139
closure_returnupto 10146301
closure_trapgen 35
closure_unlink 0
closure_varn 1131339
copybin_unlink 0
copylex 9768584
copyupto 32200206
copyvalue 738080
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 298
evalstate_restore 43843
evalstate_restore_err 34439
evalstate_save 1372561
freeep 27917
freelex 174718663
gen_relink 0
gen_unlink 0
get_and_reset_break 54148
get_arg_name 21
get_lex 46371999
get_localbitprec 14774415
get_localprec 14332203
get_next_label 203
getlocalbitprec 14
getlocalprec 14
gp_call 19215
gp_call2 91
gp_callbool 4704
gp_callprec 7413
gp_callvoid 0
gp_eval 7667221
gp_evalbool 167832
gp_evalprec 19145
gp_evalupto 577535
gp_evalvoid 3654644
gp_evalvoid2 2971
hash_from_link 0
localbitprec 2676
localprec 8008
loop_break 92579568
lvar_make_safe 0
new_ptr 58405667
new_val_cell 13685
next0 20349
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 48
parfor0 48
parfor_worker 3526
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 423114
pari_init_evaluator 425557
pari_self 35
parsum 4
parvector 6
parvector_worker 18756
pop_lex 5510700
pop_localprec 81105
pop_val 13447
pop_val_if_newer 205179
precision0 35
precision00 3521
ptr_proplock 9902158
push_lex 5650019
push_localbitprec 515039
push_localprec 81105
pushlex 60685446
pushvalue 28
reset_break 98289
restore_trace 43843
restore_vars 199716200
return0 53380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 40421288
setreflex 259
st_alloc 2346936464
trace_push 204943292
zerovalue 14

Generated by: LCOV version 1.13