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

Generated by: LCOV version 1.16