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.1 lcov report (development 28676-df828f1c94) Lines: 435 512 85.0 %
Date: 2023-08-26 07:54:43 Functions: 36 42 85.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
arith_set 101667
forcomposite 70
forcomposite_init 70
forcomposite_next 238
forprime 651
forprime_init 1322
forprime_next 45032317
forprimestep 742
forprimestep_init 2084
good_arena_size 1799
init_modular_big 8286163
init_modular_small 500926
init_primepointer_geq 0
init_primepointer_gt 0
init_primepointer_leq 0
init_primepointer_lt 16253833
initprimes 1799
initprimes0 1799
initprimes1 1799
initprimetable 1799
maxprime 43866400
maxprimeN 420
maxprime_check 0
maxprimelim 0
optimize_chunk 3169786
pari_close_primes 1799
pari_init_primes 1799
pari_sieve_init 1799
prodprimes 13648773
set_optimize 0
set_prodprimes 1799
shift_cache 117910775
sieve_block 6531
sieve_chunk 6891
sieve_init 3169774
u_forprime_arith_init 25822121
u_forprime_init 25368411
u_forprime_next 330176881
u_forprime_restrict 63
u_forprime_set_prime_table 17747169
u_forprime_sieve_arith_init 27444427
u_forprime_sieve_init 1617311

Generated by: LCOV version 1.14