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.12.0 lcov report (development 23017-8c5e72c46) Lines: 382 451 84.7 %
Date: 2018-09-23 05:39:13 Functions: 33 38 86.8 %
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
set_optimize 0
forcomposite 42
forcomposite_init 42
u_forprime_restrict 63
forcomposite_next 147
forprime_init 257
forprime 301
forprimestep 378
forprimestep_init 635
arith_set 964
good_arena_size 1542
initprimes 1542
initprimes0 1542
initprimes1 1542
initprimetable 1542
pari_close_primes 1542
pari_init_primes 1542
pari_sieve_init 1542
sieve_chunk 3520
sieve_block 4552
init_modular_small 144954
u_forprime_sieve_init 813532
optimize_chunk 1621992
sieve_init 1621992
init_modular_big 4790427
forprime_next 8401619
init_primepointer_lt 15146896
u_forprime_set_prime_table 18115056
u_forprime_init 22804556
u_forprime_arith_init 23066673
u_forprime_sieve_arith_init 23880219
maxprime 38235140
shift_cache 83434925
u_forprime_next 434929629

Generated by: LCOV version 1.13