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 30556-bb9f5f8fc8) Lines: 535 567 94.4 %
Date: 2025-11-25 09:20:50 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 167397434
addmulii_gen 89212805
addmulii_inplace 1540129129
addmulii_lg3 456213060
affrr 1341457417
dblexpo 25881681
dblmantissa 0
dbltor 13314627
div0r 186090
divir 3498851
divrs 9852241
divru 1083000871
divsi 175
divsr 798
divur 2503301
int2n 105404399
int2u 26138819
int2um1 8831
invmod2BIL 59082672
invr 62587103
invr_basecase 62586904
mantissa_real 53326055
modii 3000877623
mul0r 472788
mulii 19479235615
mulir 981336828
mulrr 3920373369
mulrrz_3 648646834
mulrrz_3end 767931444
mulrrz_end 3536330924
mulrrz_i 3686258758
mulrrz_int 53739275
mulsi 608240192
mulsr 117034193
mulss 201177104
mului 1097063633
mulur 923163154
mulur_2 702799211
muluu 4506271463
rtodbl 286225953
shifti 2258427363
sqri 1907916317
sqrr 584976092
sqrs 732021
sqru 625037183
sqrz_i 553325463
truedvmdii 131968818
truedvmdis 129086889
truedvmdsi 6200911
trunc2nr 62228357
usqrt 231459803
vals 2245344881

Generated by: LCOV version 1.16