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 30702-bddb8d6928) Lines: 483 506 95.5 %
Date: 2026-02-23 02:23:56 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 24
dirpowerssum 107
dirpowerssum0 132
dirpowerssumfun 167
dirpowerssumfun_i 167
vecf 197
smalldirpowerssum 233
naivedirpowerssum 251
direuler 256
dirpowers 570
direuler_bad 574
vecpowuu 579
_Qtor 834
halfconj 846
parsumprimefun_worker 846
vR_get_vW 846
dirpowsuminit 900
mkdata 900
sumprimeloop 900
mk01 936
pardirpowerssumfun 966
pardirpowerssumfun_i 966
Qtor 2099
vecmulsqlv 2772
direuler_Sbad 3198
pardireuler 3504
direulertou 8810
gp_callUp 11784
vecpowug 16696
get_needlog 17435
dirmuleuler_small 24618
parsqf_worker 24984
mksqfloop 25338
primelist 26748
v2unpack 26784
v2pack 27630
add4 41550
dirmuleuler_large 264729
eval_bad 589959
direuler_factor 644625
mycallvec 4592760
smallfact 15804066

Generated by: LCOV version 1.16