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 - basemath - arith2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17953-c39f2e6) Lines: 619 731 84.7 %
Date: 2015-08-28 Functions: 80 89 89.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 346 489 70.8 %

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 3038
RgV_is_ZVnon0 5166
RgV_is_ZVpos 717355
Z_issquarefree 764
Z_smoothen 13706
_addii 3360
_dvmdii 436
_mod4 14
_mulii 3619
_sqri 553
bigomega 1589
bigomegau 821
boundfact 35
check_arith_all 175301
check_arith_non0 12350
check_arith_pos 0
check_basis 168
clean_Z_factor 4382
core0 3094
core2 1477
core2_i 1484
core2fa 721
core2partial 721
coredisc 7
coredisc0 14
coredisc2 7
corediscs 934
corefa 0
corepartial 0
digits 49
digits_dacsmall 3054
divisors 361326
divisors_init 361368
divisorsu 43459
euler_sumdiv 7360
euler_sumdivk 2610
eulerphi 145607
eulerphiu 150055
eulerphiu_fact 151287
factor_pn_1 16395
factor_pn_1_limit 16395
factorlim 33888
factoru_pow 29198
fromdigits 42
fuse_Z_factor 0
gen_digits 5985
gen_digits_dac 164512
gen_digits_i 6035
gen_fromdigits 2436
gen_fromdigits_dac 31962
get_vB 8400
good_arena_size 2295
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 7985852
initprimes 2295
initprimes0 2295
initprimes1 2295
initprimetable 2295
is_Z_factor 3038
is_Z_factor_i 362790
is_Z_factornon0 5166
is_Z_factorpos 354586
issquarefree 756
maxprime 17404530
maxprime_check 0
numdiv 1589
numdiv_aux 760
omega 1589
omegau 815
set_fact 10612
set_fact_check 350749
set_optimize 0
set_vexp 61082
sieve_chunk 4952
sumdigits 35
sumdigits0 105
sumdigits_block 14
sumdigitsu 355152
sumdiv 1589
sumdiv_aux 753
sumdivk 4872
sumdivk_aux 1506
u_euler_sumdiv 1635
u_euler_sumdivk 3445
uissquarefree 8954
uissquarefree_fact 252
usumdivkvec 28

Generated by: LCOV version 1.9