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 - language - forprime.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30067-63f6f11d79) Lines: 454 520 87.3 %
Date: 2025-03-10 09:19:41 Functions: 39 41 95.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZV_copy_alloc 1883
ZV_size 1883
arith_set 101996
forcomposite 70
forcomposite_init 70
forcomposite_next 238
forprime 966
forprime_init 1315
forprime_next 45413399
forprimestep 1092
forprimestep_init 2427
good_arena_size 1883
init_modular_big 10458930
init_modular_small 4477552
initprimes 1883
initprimes0 1883
initprimes1 1883
initprimetable 1883
maxprime 33330831
maxprimeN 196
maxprime_check 0
maxprimelim 72719270
optimize_chunk 8452349
pari_close_primes 1883
pari_init_primes 1883
pari_sieve_init 1883
prodprimes 932799
prodprimeslim 932798
set_optimize 0
set_prodprimes 1883
shift_cache 130079055
sieve_block 9156
sieve_chunk 7215
sieve_init 8452343
u_forprime_arith_init 17950395
u_forprime_init 17395619
u_forprime_next 204014555
u_forprime_restrict 63
u_forprime_set_prime_table 7999196
u_forprime_sieve_arith_init 23284952
u_forprime_sieve_init 5334112

Generated by: LCOV version 1.16