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 - basemath - dirichlet.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30504-e6f76a2795) Lines: 483 506 95.5 %
Date: 2025-09-29 09:23:05 Functions: 42 45 93.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
mktrivial 0
pardirpowerssum 0
pardirpowerssum0 0
err_direuler 28
dirpowerssum 133
dirpowerssum0 154
dirpowerssumfun 203
dirpowerssumfun_i 203
vecf 238
smalldirpowerssum 280
direuler 301
naivedirpowerssum 301
dirpowers 665
direuler_bad 672
vecpowuu 686
_Qtor 973
halfconj 987
vR_get_vW 987
dirpowsuminit 1050
mkdata 1050
mk01 1092
pardirpowerssumfun 1127
pardirpowerssumfun_i 1127
Qtor 2457
vecmulsqlv 3234
direuler_Sbad 3731
pardireuler 4088
direulertou 10283
gp_callUp 13748
vecpowug 21936
get_needlog 22797
dirmuleuler_small 28728
parsqf_worker 29144
mksqfloop 29557
primelist 31206
parsumprimefun_worker 38288
sumprimeloop 38338
add4 48475
v2unpack 68543
v2pack 69527
dirmuleuler_large 308861
eval_bad 688303
direuler_factor 752080
mycallvec 5350299
smallfact 18254653

Generated by: LCOV version 1.16