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 30538-858d92d87d) Lines: 535 567 94.4 %
Date: 2025-11-07 09:22:46 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 187459
mul0r 482274
sqrs 731916
divur 2509028
divir 3503340
truedvmdsi 6202031
divrs 9869908
dbltor 13387253
dblexpo 25857445
int2u 26156069
mantissa_real 53594771
mulrrz_int 53800594
invmod2BIL 60744867
trunc2nr 62698100
invr_basecase 62806374
invr 62806663
addmulii_gen 90725580
int2n 105921293
mulsr 116376036
truedvmdis 130863904
truedvmdii 133943848
addmulii 168638199
mulss 201178115
usqrt 231582789
rtodbl 288849007
addmulii_lg3 472674306
sqrz_i 555542577
sqrr 588413019
mulsi 608500220
sqru 625590857
mulrrz_3 652529944
mulur_2 698542419
mulrrz_3end 773142416
mulur 922153406
mulir 980886141
divru 1078184041
mului 1108011606
affrr 1337610690
addmulii_inplace 1581224035
sqri 1910509591
vals 2267064054
shifti 2267718648
modii 3083904167
mulrrz_end 3544241831
mulrrz_i 3697927923
mulrr 3944700863
muluu 4558742047
mulii 20965939018

Generated by: LCOV version 1.16