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.16.2 lcov report (development 29115-f22e516b23) Lines: 435 512 85.0 %
Date: 2024-03-18 08:03:28 Functions: 36 42 85.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
maxprime_check 0
maxprimelim 0
set_optimize 0
u_forprime_restrict 63
forcomposite 70
forcomposite_init 70
forcomposite_next 238
maxprimeN 434
forprime 721
forprimestep 812
forprime_init 1301
good_arena_size 1820
initprimes 1820
initprimes0 1820
initprimes1 1820
initprimetable 1820
pari_close_primes 1820
pari_init_primes 1820
pari_sieve_init 1820
set_prodprimes 1820
forprimestep_init 2133
sieve_block 6588
sieve_chunk 6972
arith_set 101955
init_modular_small 4488773
u_forprime_sieve_init 5109260
sieve_init 7330050
optimize_chunk 7330057
init_modular_big 8805691
prodprimes 14408043
init_primepointer_lt 17861441
u_forprime_set_prime_table 19368503
u_forprime_init 27284305
u_forprime_arith_init 27891924
u_forprime_sieve_arith_init 33004092
forprime_next 44531789
maxprime 51075121
shift_cache 122886766
u_forprime_next 343265529

Generated by: LCOV version 1.14