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 29420-55f63b8cfe) Lines: 439 501 87.6 %
Date: 2024-07-03 09:03:24 Functions: 36 38 94.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
arith_set 101975
forcomposite 70
forcomposite_init 70
forcomposite_next 238
forprime 735
forprime_init 1301
forprime_next 45113960
forprimestep 861
forprimestep_init 2182
good_arena_size 1841
init_modular_big 8696127
init_modular_small 4464459
initprimes 1841
initprimes0 1841
initprimes1 1841
initprimetable 1841
maxprime 44325595
maxprimeN 196
maxprime_check 0
maxprimelim 44311080
optimize_chunk 7308197
pari_close_primes 1841
pari_init_primes 1841
pari_sieve_init 1841
prodprimes 2686083
set_optimize 0
set_prodprimes 1841
shift_cache 129453682
sieve_block 8954
sieve_chunk 7053
sieve_init 7308192
u_forprime_arith_init 21277513
u_forprime_init 20683997
u_forprime_next 202903072
u_forprime_restrict 63
u_forprime_set_prime_table 12846307
u_forprime_sieve_arith_init 26357894
u_forprime_sieve_init 5072860

Generated by: LCOV version 1.16