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 30550-07450a7a86) Lines: 535 567 94.4 %
Date: 2025-11-18 09:22:37 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168629643
addmulii_gen 90727605
addmulii_inplace 1581228172
addmulii_lg3 472677108
affrr 1343067146
dblexpo 25890283
dblmantissa 0
dbltor 13388981
div0r 187458
divir 3503624
divrs 9871136
divru 1083521166
divsi 175
divsr 798
divur 2509318
int2n 105934475
int2u 26156211
int2um1 8831
invmod2BIL 60743967
invr 62839463
invr_basecase 62838681
mantissa_real 53608934
modii 3082567443
mul0r 482314
mulii 20969515698
mulir 985764252
mulrr 3955702303
mulrrz_3 652591274
mulrrz_3end 773191731
mulrrz_end 3555418831
mulrrz_i 3708954420
mulrrz_int 53800761
mulsi 609229508
mulsr 117492158
mulss 201178598
mului 1105778732
mulur 927035966
mulur_2 704493152
muluu 4561405231
rtodbl 288888870
shifti 2269097905
sqri 1911799020
sqrr 588459004
sqrs 731790
sqru 626993205
sqrz_i 555585434
truedvmdii 133961727
truedvmdis 130881909
truedvmdsi 6202031
trunc2nr 62694725
usqrt 231791657
vals 2267154697

Generated by: LCOV version 1.16