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 17784-cfd2407) Lines: 859 1333 64.4 %
Date: 2015-04-27 Functions: 74 105 70.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 404 829 48.7 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193556
changelex 50628746
changevalue 5664268
check_array_index 30049737
checkvalue 39593861
checkvalueptr 496335
closure_callgen1 2849
closure_callgen1prec 10266
closure_callgen2 8085
closure_callgenall 0
closure_callgenvec 91
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 21812627
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 6545
closure_eval 71384861
closure_evalbrk 105
closure_evalgen 9417541
closure_evalnobrk 12576153
closure_evalres 61411
closure_evalvoid 37050910
closure_func_err 6832
closure_relink 0
closure_return 12340152
closure_returnupto 21291
closure_trapgen 21
closure_unlink 0
closure_varn 34447
copybin_unlink 0
copylex 8241807
copyupto 11435631
copyvalue 737681
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 126
evalstate_restore 21406
evalstate_restore_err 14812
evalstate_save 1293789
freeep 21644
freelex 45252759
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 23042257
get_localprec 11305180
get_next_label 140
gp_call 2345
gp_call2 91
gp_callbool 504
gp_callprec 2758
gp_callvoid 0
gp_eval 7692792
gp_evalbool 166971
gp_evalprec 1925
gp_evalupto 10885
gp_evalvoid 3648680
gp_evalvoid2 0
hash_from_link 0
localprec 238
loop_break 30948372
lvar_make_safe 0
new_ptr 34129242
new_val_cell 8337
next0 65436
opcode_need_relink 0
pareval 0
pareval_worker 0
parfor 0
parfor0 0
parfor_worker 0
parforprime 0
parforprime0 0
pari_close_evaluator 1253
pari_init_evaluator 1253
pari_self 35
parsum 0
parvector 0
parvector_worker 0
pop_lex 2669303
pop_localprec 12282
pop_val 8260
pop_val_if_newer 132321
ptr_proplock 8193794
push_lex 2669821
push_localprec 12520
pushlex 18998167
pushvalue 28
reset_break 22659
restore_trace 21406
restore_vars 71373577
return0 371
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 13765721
st_alloc 869599024
trace_push 74054311
zerovalue 14

Generated by: LCOV version 1.9