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 29451-c474da952c) Lines: 439 501 87.6 %
Date: 2024-07-16 09:03:37 Functions: 36 38 94.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
maxprime_check 0
set_optimize 0
u_forprime_restrict 63
forcomposite 70
forcomposite_init 70
maxprimeN 196
forcomposite_next 238
forprime 735
forprimestep 861
forprime_init 1301
good_arena_size 1841
initprimes 1841
initprimes0 1841
initprimes1 1841
initprimetable 1841
pari_close_primes 1841
pari_init_primes 1841
pari_sieve_init 1841
set_prodprimes 1841
forprimestep_init 2182
sieve_chunk 7053
sieve_block 8954
arith_set 101975
prodprimes 2686115
init_modular_small 4464665
u_forprime_sieve_init 5073061
sieve_init 7308396
optimize_chunk 7308399
init_modular_big 8696309
u_forprime_set_prime_table 12845569
u_forprime_init 20683706
u_forprime_arith_init 21275252
u_forprime_sieve_arith_init 26355943
maxprimelim 44303292
maxprime 44323755
forprime_next 45113960
shift_cache 129454152
u_forprime_next 202923414

Generated by: LCOV version 1.16