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.0 lcov report (development 29712-7c8a932571) Lines: 444 510 87.1 %
Date: 2024-11-15 09:08:45 Functions: 36 38 94.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
arith_set 101982
forcomposite 70
forcomposite_init 70
forcomposite_next 238
forprime 959
forprime_init 1315
forprime_next 45385959
forprimestep 1085
forprimestep_init 2420
good_arena_size 1848
init_modular_big 10473795
init_modular_small 4506109
initprimes 1848
initprimes0 1848
initprimes1 1848
initprimetable 1848
maxprime 46725784
maxprimeN 196
maxprime_check 0
maxprimelim 70056930
optimize_chunk 8482479
pari_close_primes 1848
pari_init_primes 1848
pari_sieve_init 1848
prodprimes 2691350
set_optimize 0
set_prodprimes 1848
shift_cache 129998191
sieve_block 9115
sieve_chunk 7080
sieve_init 8482478
u_forprime_arith_init 23647036
u_forprime_init 23054876
u_forprime_next 207639699
u_forprime_restrict 63
u_forprime_set_prime_table 13689169
u_forprime_sieve_arith_init 29013363
u_forprime_sieve_init 5360171

Generated by: LCOV version 1.16