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 - prime.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 21505-505a0e1) Lines: 583 641 91.0 %
Date: 2017-12-17 06:20:46 Functions: 66 68 97.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BLS_test 63
BPSW_isprime 953575
BPSW_isprime_small 953743
BPSW_psp 6907757
BPSW_psp_nosmalldiv 30045
BPSW_try_PL 5008
Fl_MR_Jaeschke 1641
Fl_MR_Jaeschke_ok 1430879
Fl_bad_for_base 8094626
Fl_init_MR_Jaeschke 8085285
IsLucasPsP 16366
LucasMod 16366
MR_Jaeschke 1775
MR_Jaeschke_ok 7418
PL_certificate 28
PL_certify 3075
addp 161
addp_union 28
addprimes 161
bad_for_base 101503
check_prime 49
cleanprimetab 21
gisprime 3536623
gispseudoprime 14
gprimepi_lower_bound 1
gprimepi_upper_bound 1
init_MR_Jaeschke 101372
is_2_prp_101 1889306
isanypower_nosmalldiv 21909
isprime 4332696
isprimePL 35
ispseudoprime 147
iu_coprime 321108
millerrabin 28
pari_init_primetab 1512
pari_pthread_init_primetab 11783
pari_thread_init_primetab 92301
pl831 15231
prime 168
prime_successor 70
prime_table_closest_p 14861374
prime_table_find_n 161
prime_table_next_p 14861294
primepi 252
primepi_lower_bound 14
primepi_upper_bound 56743
primes 63
primes0 119
primes_interval 98
primes_interval_i 7348
primes_interval_zv 7194
primes_upto_zv 154
primes_zv 0
randomprime 49
removeprimes 28
rmprime 28
rmprimes 28
uBPSW_psp 5767381
u_2_prp 8080777
u_LucasMod 36215
u_LucasMod_pre 1608070
uislucaspsp 1644292
uisprime 28806788
uisprime_101 9337702
uisprime_661 25887
uprime 0
uprimepi 9330
uu_coprime 33839853

Generated by: LCOV version 1.11