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 17910-ca0bb25) Lines: 988 1363 72.5 %
Date: 2015-07-07 Functions: 87 107 81.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 495 855 57.9 %

Function Name Sort by function name Hit count Sort by hit count
bincopy_relink 0
break0 70175
change_compo 8193556
changelex 54016998
changevalue 5664442
check_array_index 30044152
checkvalue 39588245
checkvalueptr 496335
closure_callgen1 10555
closure_callgen1prec 10798
closure_callgen2 8085
closure_callgenall 4
closure_callgenvec 7110
closure_callgenvecprec 91
closure_callvoid1 0
closure_castgen 21807043
closure_castlong 651
closure_context 56
closure_disassemble 0
closure_err 57658
closure_eval 86973049
closure_evalbrk 105
closure_evalgen 16895757
closure_evalnobrk 16769205
closure_evalres 128411
closure_evalvoid 40991212
closure_func_err 57966
closure_relink 0
closure_return 12418264
closure_returnupto 36519
closure_trapgen 21
closure_unlink 0
closure_varn 34447
copybin_unlink 0
copylex 8241807
copyupto 20333860
copyvalue 737681
disassemble_cast 0
err_var 0
evalstate_clone 0
evalstate_reset 133
evalstate_restore 72525
evalstate_restore_err 14818
evalstate_save 1368414
freeep 24951
freelex 45312837
gen_relink 0
gen_unlink 0
get_arg_name 14
get_lex 26914946
get_localprec 18585436
get_next_label 140
gp_call 3045
gp_call2 91
gp_callbool 504
gp_callprec 3290
gp_callvoid 0
gp_eval 7681263
gp_evalbool 166971
gp_evalprec 1925
gp_evalupto 10983
gp_evalvoid 3648680
gp_evalvoid2 2431
hash_from_link 0
localprec 252
loop_break 34861871
lvar_make_safe 0
new_ptr 36369372
new_val_cell 8435
next0 65436
opcode_need_relink 0
pareval 2
pareval_worker 4
parfor 44
parfor0 44
parfor_worker 2833
parforprime 2
parforprime0 2
parforvec 6
parforvec0 6
pari_close_evaluator 1780
pari_init_evaluator 3287
pari_self 35
parsum 0
parvector 4
parvector_worker 176
pop_lex 2693549
pop_localprec 12814
pop_val 8358
pop_val_if_newer 235868
ptr_proplock 8193794
push_lex 2698054
push_localprec 13066
pushlex 18985393
pushvalue 28
reset_break 73793
restore_trace 72525
restore_vars 87423132
return0 381
safeel 0
safegcoeff 0
safegel 0
safelistel 0
set_lex 25313355
st_alloc 980430142
trace_push 89507207
zerovalue 14

Generated by: LCOV version 1.9