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 17566-be4cfd0) Lines: 899 1303 69.0 %
Date: 2015-02-28 Functions: 78 100 78.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 442 814 54.3 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193465
changelex 50545255
changevalue 5663706
check_array_index 29871499
checkvalue 39192274
closure_callgen1 9577
closure_callgen2 8085
closure_callgenall 4
closure_callgenvec 6926
closure_callvoid1 0
closure_castgen 21634482
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 57511
closure_eval 94390124
closure_evalbrk 105
closure_evalgen 16749836
closure_evalnobrk 25026690
closure_evalres 126196
closure_evalvoid 40854601
closure_func_err 57763
closure_relink 0
closure_return 11921168
closure_returnupto 24572
closure_trapgen 21
closure_unlink 0
closure_varn 42896
copybin_unlink 0
copylex 8191064
copyupto 19566032
copyvalue 737569
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 119
evalstate_restore 72378
evalstate_restore_err 14818
evalstate_save 1365482
freeep 24131
freelex 44321893
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 26690299
get_localprec 17739170
get_next_label 133
gp_call 2177
gp_call2 91
gp_callbool 504
gp_callvoid 0
gp_eval 17221484
gp_evalbool 166943
gp_evalupto 10451
gp_evalvoid 3648680
gp_evalvoid2 2336
hash_from_link 0
localprec 7
loop_break 34616829
lvar_make_safe 0
new_ptr 34052985
new_val_cell 7987
next0 65415
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 42
parfor0 42
parfor_worker 2738
parforprime 0
parforprime0 0
pari_close_evaluator 1738
pari_init_evaluator 3084
pari_self 35
parsum 0
parvector 4
parvector_worker 166
pop_lex 2629796
pop_localprec 21
pop_val 7910
pop_val_if_newer 235672
ptr_proplock 8193738
push_lex 2634126
push_localprec 28
pushlex 18499229
pushvalue 28
reset_break 73618
restore_trace 72378
restore_vars 94819734
return0 373
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 33636323
st_alloc 1016252656
trace_push 96793351
zerovalue 14

Generated by: LCOV version 1.9