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-bordeaux1.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.8.0 lcov report (development 18607-f2efcf2) Lines: 1006 1382 72.8 %
Date: 2016-02-12 Functions: 90 110 81.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 506 869 58.2 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8199177
changelex 108334185
changevalue 5675656
check_array_index 46805443
checkvalue 76375672
checkvalueptr 499583
closure_callgen1 57059
closure_callgen1prec 10798
closure_callgen2 101241
closure_callgenall 4
closure_callgenvec 28693
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 38562670
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 57903
closure_eval 152636375
closure_evalbrk 105
closure_evalgen 17127246
closure_evalnobrk 32841989
closure_evalres 133080
closure_evalvoid 71376589
closure_func_err 58239
closure_relink 0
closure_return 31432467
closure_returnupto 197761
closure_trapgen 21
closure_unlink 0
closure_varn 38954
copybin_unlink 0
copylex 8247407
copyupto 20676392
copyvalue 737702
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 161
evalstate_restore 73071
evalstate_restore_err 15119
evalstate_save 1374034
freeep 22608
freelex 89697947
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 43069662
get_localbitprec 20379442
get_localprec 20368407
get_next_label 140
gp_call 4445
gp_call2 91
gp_callbool 45164
gp_callprec 3290
gp_callvoid 0
gp_eval 7106661
gp_evalbool 166971
gp_evalprec 1925
gp_evalupto 160202
gp_evalvoid 3651473
gp_evalvoid2 2428
hash_from_link 0
localbitprec 14
localprec 3871
loop_break 65174862
lvar_make_safe 0
new_ptr 36391149
new_val_cell 9436
next0 65436
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 44
parfor0 44
parfor_worker 2835
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 1822
pari_init_evaluator 5779
pari_self 35
parsum 0
parvector 4
parvector_worker 181
pop_lex 3892846
pop_localprec 13647
pop_val 9359
pop_val_if_newer 246956
ptr_proplock 8199415
push_lex 3897346
push_localbitprec 14
push_localprec 17518
pushlex 54538503
pushvalue 28
reset_break 74367
restore_trace 73071
restore_vars 153007157
return0 380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 26049688
st_alloc 1652311169
trace_push 156368648
zerovalue 14

Generated by: LCOV version 1.9