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 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.10.0 lcov report (development 21921-ca7d0c8) Lines: 367 437 84.0 %
Date: 2018-02-20 06:16:13 Functions: 31 36 86.1 %
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 301
forprime_init 562
arith_set 763
good_arena_size 1557
initprimes 1557
initprimes0 1557
initprimes1 1557
initprimetable 1557
pari_close_primes 1557
pari_init_primes 1557
pari_sieve_init 1557
sieve_chunk 3544
sieve_block 4679
init_modular_small 136044
u_forprime_sieve_init 795860
optimize_chunk 1539242
sieve_init 1539242
init_modular_big 4730218
forprime_next 8401452
init_primepointer_lt 14818540
u_forprime_set_prime_table 17774554
u_forprime_init 22472138
u_forprime_arith_init 22676222
u_forprime_sieve_arith_init 23472096
maxprime 37497218
shift_cache 87889809
u_forprime_next 435327618

Generated by: LCOV version 1.11