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 24504-0a2b20c0b) Lines: 1111 1495 74.3 %
Date: 2019-10-23 05:48:59 Functions: 109 129 84.5 %
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
parvector 6
getlocalbitprec 14
getlocalprec 14
zerovalue 14
evalstate_set_trace 18
get_arg_name 21
pushvalue 28
parsum 34
bitprecision0 35
closure_trapgen 35
pari_self 35
precision0 35
parfor 48
parfor0 48
closure_context 84
closure_callgen0prec 91
gp_call2 91
closure_evalbrk 161
get_next_label 224
parvector_worker 231
setreflex 259
vecsum_i 261
arithprogset 288
evalstate_reset 319
closure_callgenvecdef 322
closure_callgenvecdefprec 322
_bitprecision0 587
bitprecision00 622
localbitprec 2676
gp_evalvoid2 2969
_precision0 3549
parfor_worker 3549
precision00 3584
closure_castlong 5467
gp_callprec 7413
localprec 8015
closure_err 9411
closure_func_err 9961
checkprec 10682
_prec 10761
pop_val 13839
new_val_cell 14126
gp_evalprec 19145
gp_call 19215
next0 20349
freeep 28526
evalstate_restore_err 34761
evalstate_restore 44298
restore_trace 44298
return0 53381
get_and_reset_break 54148
closure_callgen1prec 60616
break0 70326
pop_localprec 81287
push_localprec 81294
closure_callgen2 89929
reset_break 98765
closure_evalres 100346
evalstate_get_trace 152787
gp_evalbool 167832
pop_val_if_newer 208630
pari_close_evaluator 223651
pari_init_evaluator 226782
push_localbitprec 315998
gp_evalupto 577535
copyvalue 738080
gp_callbool 859502
closure_varn 1131353
closure_callgenvec 1296870
evalstate_save 1375854
gp_evalvoid 3654644
closure_callgen1 4358289
pop_lex 5511333
push_lex 5650658
closure_returnupto 5805818
gp_eval 7890803
change_compo 9697177
copylex 9768584
ptr_proplock 9902158
get_localprec 14551663
get_localbitprec 14798086
checkvalueptr 23111802
closure_evalgen 23500890
copyupto 27916715
changevalue 29067110
closure_evalnobrk 32939157
closure_return 40432764
set_lex 40678898
get_lex 46128751
new_ptr 58405744
pushlex 61539586
closure_castgen 91699589
loop_break 92363078
closure_evalvoid 98710567
check_array_index 104784561
checkvalue 112195774
changelex 158412291
freelex 162384672
closure_eval 195624256
restore_vars 195699891
trace_push 200963993
st_alloc 2335817838

Generated by: LCOV version 1.13