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 - prime.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17097-9391e68) Lines: 565 613 92.2 %
Date: 2014-11-21 Functions: 61 64 95.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 401 514 78.0 %

Function Name Sort by function name Hit count Sort by hit count
BLS_test 230
BPSW_isprime 320377
BPSW_isprime_big 3115
BPSW_isprime_small 324467
BPSW_psp 673952
BPSW_psp_nosmalldiv 11511
Fl_MR_Jaeschke 1653
Fl_MR_Jaeschke_ok 1348226
Fl_bad_for_base 5725886
Fl_init_MR_Jaeschke 5724261
IsLucasPsP 11945
LucasMod 11945
MR_Jaeschke 1850
MR_Jaeschke_ok 5347
addp 115
addp_union 20
addprimes 115
bad_for_base 56262
check_prime 4090
cleanprimetab 15
gisprime 980
gispseudoprime 10
gprimepi_lower_bound 1
gprimepi_upper_bound 1
init_MR_Jaeschke 56097
is_2_prp_101 1539565
isanypower_nosmalldiv 5444
isprime 511496
isprimePL 490
isprimeSelfridge 1960
ispseudoprime 0
iu_coprime 205147
millerrabin 20
pl831 11825
prime 120
prime_successor 50
prime_table_closest_p 4186084
prime_table_find_n 115
prime_table_next_p 4186000
primepi 175
primepi_lower_bound 10
primepi_upper_bound 6270
primes 35
primes0 65
primes_interval 30
primes_interval_i 83
primes_interval_zv 18
primes_upto_zv 65
primes_zv 0
randomprime 35
removeprimes 20
rmprime 20
rmprimes 20
selfridge_init 485
uBPSW_psp 4183128
u_2_prp 5722608
u_LucasMod 2139438
uislucaspsp 2139443
uisprime 12796728
uisprime_101 11154
uisprime_661 18329
uprime 0
uprimepi 4609
uu_coprime 21922554

Generated by: LCOV version 1.9