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 20116-58a92a9) Lines: 1037 1392 74.5 %
Date: 2017-01-23 05:49:11 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 70228
change_compo 8388758
changelex 116238800
changevalue 5958064
check_array_index 49618172
checkvalue 84016271
checkvalueptr 499842
closure_callgen1 79697
closure_callgen1prec 64145
closure_callgen2 78295
closure_callgenall 4
closure_callgenvec 307102
closure_callgenvecprec 105
closure_callvoid1 0
closure_castgen 40935889
closure_castlong 127771
closure_context 84
closure_disassemble 0
closure_err 16372
closure_eval 151642353
closure_evalbrk 161
closure_evalgen 9987845
closure_evalnobrk 31365386
closure_evalres 83917
closure_evalvoid 75753613
closure_func_err 16750
closure_relink 0
closure_return 34624525
closure_returnupto 528505
closure_trapgen 35
closure_unlink 0
closure_varn 206024
copybin_unlink 0
copylex 8437674
copyupto 14469908
copyvalue 737947
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 182
evalstate_restore 30973
evalstate_restore_err 14538
evalstate_save 1320802
freeep 24423
freelex 98371894
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 45822235
get_localbitprec 14118563
get_localprec 14106641
get_next_label 161
gp_call 5726
gp_call2 91
gp_callbool 46802
gp_callprec 3290
gp_callvoid 0
gp_eval 7654931
gp_evalbool 166887
gp_evalprec 2576
gp_evalupto 658616
gp_evalvoid 3654651
gp_evalvoid2 2452
hash_from_link 0
localbitprec 49
localprec 7945
loop_break 69557366
lvar_make_safe 0
new_ptr 36674664
new_val_cell 10304
next0 17570
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 46
parfor0 46
parfor_worker 2870
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 64543
pari_init_evaluator 63838
pari_self 35
parsum 2
parvector 4
parvector_worker 19921
pop_lex 4371135
pop_localprec 67498
pop_val 10206
pop_val_if_newer 176584
ptr_proplock 8388982
push_lex 4375804
push_localbitprec 49
push_localprec 75443
pushlex 59639336
pushvalue 28
reset_break 32311
restore_trace 30973
restore_vars 151892602
return0 388
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 15646421
st_alloc 1685406322
trace_push 155850091
zerovalue 14

Generated by: LCOV version 1.11