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 17842-03c132c) Lines: 939 1333 70.4 %
Date: 2015-05-25 Functions: 83 105 79.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 459 827 55.5 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193556
changelex 53989711
changevalue 5664435
check_array_index 30044138
checkvalue 39587944
checkvalueptr 496335
closure_callgen1 10440
closure_callgen1prec 10798
closure_callgen2 8085
closure_callgenall 4
closure_callgenvec 7011
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 21807028
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 57658
closure_eval 86856104
closure_evalbrk 105
closure_evalgen 16895748
closure_evalnobrk 16768701
closure_evalres 128191
closure_evalvoid 40855012
closure_func_err 57966
closure_relink 0
closure_return 12417830
closure_returnupto 36322
closure_trapgen 21
closure_unlink 0
closure_varn 34447
copybin_unlink 0
copylex 8241807
copyupto 19583087
copyvalue 737681
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 133
evalstate_restore 72525
evalstate_restore_err 14818
evalstate_save 1368153
freeep 24915
freelex 45283660
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 26774445
get_localprec 18557410
get_next_label 140
gp_call 3045
gp_call2 91
gp_callbool 504
gp_callprec 3290
gp_callvoid 0
gp_eval 7680752
gp_evalbool 166971
gp_evalprec 1925
gp_evalupto 10983
gp_evalvoid 3648680
gp_evalvoid2 2336
hash_from_link 0
localprec 245
loop_break 34721707
lvar_make_safe 0
new_ptr 36369278
new_val_cell 8435
next0 65436
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 42
parfor0 42
parfor_worker 2740
parforprime 0
parforprime0 0
pari_close_evaluator 1780
pari_init_evaluator 3138
pari_self 35
parsum 0
parvector 4
parvector_worker 172
pop_lex 2693440
pop_localprec 12814
pop_val 8358
pop_val_if_newer 235700
ptr_proplock 8193794
push_lex 2697846
push_localprec 13059
pushlex 18985255
pushvalue 28
reset_break 73793
restore_trace 72525
restore_vars 87229567
return0 380
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 25312809
st_alloc 977894180
trace_push 89384547
zerovalue 14

Generated by: LCOV version 1.9