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 16741-1378b1c) Lines: 599 713 84.0 %
Date: 2014-08-17 Functions: 75 85 88.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 328 473 69.3 %

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 150
RgV_is_ZVnon0 205
RgV_is_ZVpos 220180
Z_issquarefree 765
Z_smoothen 6820
_addii 0
_dvmdii 312
_mod4 20
_mulii 105
_sqri 220
bigomega 140
boundfact 35
check_arith_all 120625
check_arith_non0 2157
check_arith_pos 0
check_basis 90
clean_Z_factor 120
core0 190
core2 50
core2_i 60
core2fa 120
core2partial 120
coredisc 10
coredisc0 10
coredisc2 10
corefa 0
corepartial 0
digits 35
digits_dacsmall 2180
divisors 258105
divisors_init 258135
divisorsu 21635
euler_sumdiv 1434
euler_sumdivk 338
eulerphi 103000
eulerphiu 106051
eulerphiu_fact 106321
factor_pn_1 4755
factor_pn_1_limit 4755
factorlim 16995
factoru_pow 15511
fuse_Z_factor 0
gen_digits 2405
gen_digits_dac 51850
gen_digits_i 2441
gen_fromdigits 1020
gen_fromdigits_dac 7480
get_vB 3460
good_arena_size 862
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 4411172
initprimes 862
initprimes0 862
initprimes1 862
initprimetable 862
is_Z_factor 150
is_Z_factor_i 110275
is_Z_factornon0 205
is_Z_factorpos 109920
issquarefree 25
maxprime 9492370
maxprime_check 0
numdiv 140
numdiv_aux 49
omega 140
set_fact 7600
set_fact_check 250535
set_optimize 0
set_vexp 22110
sieve_chunk 2056
sumdigits 25
sumdigits0 75
sumdigits_block 10
sumdigitsu 253680
sumdiv 140
sumdiv_aux 39
sumdivk 490
sumdivk_aux 78
u_euler_sumdiv 401
u_euler_sumdivk 927
uissquarefree 5493
uissquarefree_fact 120
usumdivkvec 20

Generated by: LCOV version 1.9