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 30584-b9873745ba) Lines: 535 567 94.4 %
Date: 2025-12-21 09:21:02 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168677130
addmulii_gen 90734185
addmulii_inplace 1581326696
addmulii_lg3 472752315
affrr 1343666376
dblexpo 25891747
dblmantissa 0
dbltor 13383931
div0r 186652
divir 3502233
divrs 9871285
divru 1083961597
divsi 175
divsr 798
divur 2508492
int2n 106040561
int2u 26073095
int2um1 8831
invmod2BIL 60828622
invr 62850844
invr_basecase 62850554
mantissa_real 53750779
modii 3081374861
mul0r 482307
mulii 20969880925
mulir 986584327
mulrr 3956844938
mulrrz_3 652662714
mulrrz_3end 773288464
mulrrz_end 3557123164
mulrrz_i 3709989855
mulrrz_int 53801066
mulsi 610667240
mulsr 117489245
mulss 201177746
mului 1110054263
mulur 927806406
mulur_2 705266060
muluu 4565758067
rtodbl 288689879
shifti 2259904164
sqri 1901138523
sqrr 589154781
sqrs 731995
sqru 626921049
sqrz_i 556302620
truedvmdii 134162128
truedvmdis 131079002
truedvmdsi 6202031
trunc2nr 62677458
usqrt 231448010
vals 2275488738

Generated by: LCOV version 1.16