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-bordeaux.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 18889-ac2cbba) Lines: 620 727 85.3 %
Date: 2016-05-01 Functions: 81 89 91.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 346 487 71.0 %

Function Name Sort by function name Hit count Sort by hit count
RgV_is_ZV0 3178
RgV_is_ZVnon0 5166
RgV_is_ZVpos 790721
Z_issquarefree 772
Z_smoothen 12593
_addii 1736
_dvmdii 436
_mod4 14
_mulii 1953
_sqri 462
bigomega 1589
bigomegau 284244
boundfact 35
check_arith_all 187439
check_arith_non0 14402
check_arith_pos 189
check_basis 168
clean_Z_factor 4501
core0 3094
core2 1477
core2_i 1484
core2fa 728
core2partial 728
coredisc 7
coredisc0 14
coredisc2 7
corediscs 934
corefa 0
corepartial 0
digits 49
digits_dacsmall 3054
divisors 361354
divisors_init 361396
divisorsu 110568
divisorsu_fact 110568
euler_sumdiv 9677
eulerphi 145607
eulerphiu 150090
eulerphiu_fact 151350
factor_pn_1 16549
factor_pn_1_limit 16549
factorlim 34196
factoru_pow 28244
fromdigits 42
fuse_Z_factor 0
gen_digits 6020
gen_digits_dac 164813
gen_digits_i 6070
gen_fromdigits 2443
gen_fromdigits_dac 28735
get_vB 8442
good_arena_size 2344
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 8780382
initprimes 2344
initprimes0 2344
initprimes1 2344
initprimetable 2344
is_Z_factor 3178
is_Z_factor_i 399543
is_Z_factornon0 5166
is_Z_factorpos 391199
issquarefree 46963
maxprime 19069774
maxprime_check 0
numdiv 1897
numdiv_aux 760
omega 1589
omegau 815
set_fact 10633
set_fact_check 350756
set_optimize 0
set_vexp 61040
sieve_chunk 5064
sumdigits 35
sumdigits0 105
sumdigits_block 14
sumdigitsu 355152
sumdiv 1589
sumdiv_aux 753
sumdivk 6545
sumdivk_aux 1506
u_euler_sumdiv 1635
uissquarefree 9723
uissquarefree_fact 280
usumdiv_fact 808
usumdivk_fact 3380

Generated by: LCOV version 1.9