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 19825-b77c7f8) Lines: 1032 1389 74.3 %
Date: 2016-12-04 05:49:01 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 70221
change_compo 8394358
changelex 116169928
changevalue 5941390
check_array_index 49185160
checkvalue 83284029
checkvalueptr 499835
closure_callgen1 79191
closure_callgen1prec 10854
closure_callgen2 73983
closure_callgenall 4
closure_callgenvec 306982
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 40746777
closure_castlong 658
closure_context 70
closure_disassemble 0
closure_err 15875
closure_eval 151732223
closure_evalbrk 140
closure_evalgen 9980332
closure_evalnobrk 31562090
closure_evalres 81453
closure_evalvoid 75740422
closure_func_err 16239
closure_relink 0
closure_return 34528765
closure_returnupto 470382
closure_trapgen 35
closure_unlink 0
closure_varn 145061
copybin_unlink 0
copylex 8442581
copyupto 14354812
copyvalue 737947
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 168
evalstate_restore 30224
evalstate_restore_err 14300
evalstate_save 1317434
freeep 23765
freelex 98189529
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 45812464
get_localbitprec 13959231
get_localprec 13947399
get_next_label 154
gp_call 5103
gp_call2 91
gp_callbool 46802
gp_callprec 3290
gp_callvoid 0
gp_eval 7585939
gp_evalbool 166887
gp_evalprec 1925
gp_evalupto 638379
gp_evalvoid 3651473
gp_evalvoid2 2449
hash_from_link 0
localbitprec 42
localprec 7931
loop_break 69538432
lvar_make_safe 0
new_ptr 36690386
new_val_cell 10129
next0 17570
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 2867
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 64466
pari_init_evaluator 63804
pari_self 35
parsum 2
parvector 4
parvector_worker 19787
pop_lex 4355560
pop_localprec 13836
pop_val 10031
pop_val_if_newer 164572
ptr_proplock 8394582
push_lex 4360075
push_localbitprec 42
push_localprec 21767
pushlex 59542776
pushvalue 28
reset_break 31534
restore_trace 30224
restore_vars 151886395
return0 380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 15844944
st_alloc 1682916148
trace_push 155983160
zerovalue 14

Generated by: LCOV version 1.11