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.1 lcov report (development 22708-0f0e6fe44) Lines: 1029 1394 73.8 %
Date: 2018-06-18 05:36:21 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
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
parsum 2
closure_callgenall 4
pareval_worker 4
parvector 4
parforvec 6
parforvec0 6
zerovalue 14
get_arg_name 21
pushvalue 28
closure_trapgen 35
pari_self 35
parfor 44
parfor0 44
closure_context 84
gp_call2 91
localbitprec 91
push_localbitprec 91
closure_callgenvecprec 147
closure_evalbrk 161
get_next_label 182
evalstate_reset 277
gp_callbool 672
gp_evalvoid2 2514
parfor_worker 3007
gp_callprec 3423
closure_castlong 5467
localprec 7959
closure_err 8665
closure_func_err 9145
pop_val 12818
new_val_cell 12954
gp_evalprec 19040
gp_call 19145
parvector_worker 20154
next0 20349
freeep 26954
evalstate_restore_err 34411
evalstate_restore 43160
restore_trace 43160
return0 53191
closure_callgen1prec 56626
break0 70319
pop_localprec 76821
push_localprec 84780
closure_callgen2 89929
closure_evalres 93656
reset_break 97394
pari_close_evaluator 110781
pari_init_evaluator 112860
gp_evalbool 167426
pop_val_if_newer 192574
closure_callgen1 212132
gp_evalupto 577304
copyvalue 737989
closure_callgenvec 920776
closure_varn 1130282
closure_returnupto 1279174
evalstate_save 1366785
gp_evalvoid 3654644
pop_lex 5364557
push_lex 5503353
gp_eval 7689712
change_compo 9693712
copylex 9743069
ptr_proplock 9898707
get_localprec 14258107
get_localbitprec 14275593
copyupto 20518070
checkvalueptr 23111536
closure_evalgen 23657419
changevalue 29060516
closure_evalnobrk 34274062
closure_return 35884400
set_lex 41455551
get_lex 45125938
pushlex 60513173
new_ptr 60615887
closure_castgen 90976555
loop_break 91849018
closure_evalvoid 98163674
check_array_index 103024722
checkvalue 112137359
freelex 148348811
changelex 163502864
closure_eval 191986214
restore_vars 192051953
trace_push 197239072
st_alloc 2319133342

Generated by: LCOV version 1.13