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) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 95.5 % 506 483
Test Date: 2026-07-23 17:04:59 Functions: 93.3 % 45 42
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Qtor 2457
_Qtor 973
add4 48475
direuler 301
direuler_Sbad 4081
direuler_bad 658
direuler_factor 752871
direulertou 10941
dirmuleuler_large 395598
dirmuleuler_small 33460
dirpowers 903
dirpowerssum 133
dirpowerssum0 154
dirpowerssumfun 203
dirpowerssumfun_i 203
dirpowsuminit 1050
err_direuler 28
eval_bad 688303
get_needlog 23133
gp_callUp 13748
halfconj 987
mk01 1092
mkdata 1050
mksqfloop 29561
mktrivial 0
mycallvec 5358220
naivedirpowerssum 301
pardireuler 4438
pardirpowerssum 0
pardirpowerssum0 0
pardirpowerssumfun 1127
pardirpowerssumfun_i 1127
parsqf_worker 29148
parsumprimefun_worker 38341
primelist 38731
smalldirpowerssum 280
smallfact 18438077
sumprimeloop 38404
v2pack 69589
v2unpack 68602
vR_get_vW 987
vecf 238
vecmulsqlv 3234
vecpowug 22272
vecpowuu 686

Generated by: LCOV version 2.0-1