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 20459-9710128) Lines: 1035 1392 74.4 %
Date: 2017-03-30 05:32:39 Functions: 91 110 82.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 60196
change_compo 7192530
changelex 99701482
changevalue 5107044
check_array_index 44215245
checkvalue 72947596
checkvalueptr 428442
closure_callgen1 42893
closure_callgen1prec 56082
closure_callgen2 65622
closure_callgenall 4
closure_callgenvec 253266
closure_callgenvecprec 90
closure_callvoid1 0
closure_castgen 36888304
closure_castlong 564
closure_context 72
closure_disassemble 0
closure_err 6770
closure_eval 130519437
closure_evalbrk 138
closure_evalgen 8203613
closure_evalnobrk 27268426
closure_evalres 65506
closure_evalvoid 65495898
closure_func_err 7122
closure_relink 0
closure_return 29675990
closure_returnupto 417263
closure_trapgen 30
closure_unlink 0
closure_varn 688206
copybin_unlink 0
copylex 7232298
copyupto 12188657
copyvalue 634692
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 178
evalstate_restore 19310
evalstate_restore_err 12486
evalstate_save 1123931
freeep 19582
freelex 84401386
gen_relink 0
gen_unlink 0
get_arg_name 12
get_lex 39698592
get_localbitprec 12099055
get_localprec 12088652
get_next_label 138
gp_call 15270
gp_call2 78
gp_callbool 576
gp_callprec 2820
gp_callvoid 0
gp_eval 6441948
gp_evalbool 143046
gp_evalprec 16320
gp_evalupto 430014
gp_evalvoid 3132558
gp_evalvoid2 2454
hash_from_link 0
localbitprec 54
localprec 6816
loop_break 60140836
lvar_make_safe 0
new_ptr 31437674
new_val_cell 9020
next0 15252
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 2865
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 64061
pari_init_evaluator 63873
pari_self 30
parsum 2
parvector 4
parvector_worker 19899
pop_lex 3780205
pop_localprec 73044
pop_val 8936
pop_val_if_newer 137114
ptr_proplock 7192722
push_lex 3783792
push_localbitprec 54
push_localprec 79860
pushlex 51324069
pushvalue 24
reset_break 63476
restore_trace 19310
restore_vars 130822228
return0 43330
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 13651333
st_alloc 1455591485
trace_push 134182687
zerovalue 12

Generated by: LCOV version 1.11