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 - kernel/none - mp_indep.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30586-ccf601f509) Lines: 535 567 94.4 %
Date: 2025-12-25 09:21:36 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168685821
addmulii_gen 90750857
addmulii_inplace 1581459041
addmulii_lg3 472778221
affrr 1344004520
dblexpo 25894062
dblmantissa 0
dbltor 13383895
div0r 186656
divir 3502240
divrs 9871259
divru 1084135645
divsi 175
divsr 798
divur 2508500
int2n 106040242
int2u 26081896
int2um1 8831
invmod2BIL 60827530
invr 62859379
invr_basecase 62859003
mantissa_real 53755183
modii 3082098363
mul0r 482290
mulii 20978337153
mulir 986993806
mulrr 3957576216
mulrrz_3 652704355
mulrrz_3end 773347841
mulrrz_end 3557663224
mulrrz_i 3710955841
mulrrz_int 53801066
mulsi 610720422
mulsr 117483585
mulss 201178708
mului 1110499304
mulur 928190739
mulur_2 705555793
muluu 4569992643
rtodbl 288690813
shifti 2260334013
sqri 1901625011
sqrr 589210795
sqrs 732584
sqru 626939955
sqrz_i 556404812
truedvmdii 134173695
truedvmdis 131090512
truedvmdsi 6202031
trunc2nr 62674892
usqrt 231418011
vals 2275818010

Generated by: LCOV version 1.16