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 to exceed 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.18.1 lcov report (development 30074-db9b3c0519) Lines: 639 707 90.4 %
Date: 2025-03-13 08:38:27 Functions: 71 77 92.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
is_2_prp_101 0
ispseudoprime 0
primecert 0
uis2psp 0
uislucaspsp 0
uprime 0
gprimepi_lower_bound 1
gprimepi_upper_bound 1
gispseudoprime 12
primepi_lower_bound 12
cleanprimetab 18
millerrabin 24
removeprimes 24
rmprime 24
rmprimes 24
_isprimePL 36
primecertexport 42
addp_union 48
check_ecppcert 48
prime_successor 48
primecertisvalid 48
primes_interval_i 67
PL_isvalid 72
primecert0 72
primes_zv 78
randomprime 78
prime_table_closest_p 83
cert_type 84
primes 90
prime_interval 126
randomprime0 132
addp 162
addprimes 162
primes_interval 186
primes0 198
primepi 216
prime_table_find_n 234
prime 240
primes_upto_zv 276
check_ecppcertentry 336
PL_certify 454
BLS_test 480
init_MR_Jaeschke 519
ispsp 924
BPSW_try_PL 1256
pari_set_primetab 1628
pl831 2340
isprimePL 2556
PL_certificate 2610
primecertPL 2628
MR_Jaeschke 6262
primes_interval_zv 12427
PRIMES_interval 12522
uisprime_101 13829
uisprime_661 24670
LucasMod 26049
islucaspsp 26049
Z_isanypower_nosmalldiv 35987
BPSW_psp_nosmalldiv 41569
is2psp 131216
_uispsp 220108
uispsp 321336
primepi_upper_bound 346106
iu_coprime 408197
get_disc 919755
u_LucasMod_pre 919755
uislucaspsp_pre 919755
BPSW_isprime 3579650
BPSW_isprime_small 3596672
_uisprime 6999505
uispsp_pre 7005986
uprimepi 7471226
gisprime 35477850
isprime 36112440
BPSW_psp 44941247
PRIMES_search 49027147
uisprime 66371973

Generated by: LCOV version 1.16