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 30480-572da319a6) Lines: 535 567 94.4 %
Date: 2025-08-26 09:23: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 187460
mul0r 482295
sqrs 732460
divur 2506946
divir 3501377
truedvmdsi 6202031
divrs 9865333
dbltor 13386851
int2u 26154299
dblexpo 26463024
mantissa_real 53597865
mulrrz_int 55660756
invmod2BIL 60744260
trunc2nr 62693907
invr_basecase 63098112
invr 63098383
addmulii_gen 90722954
int2n 105909584
mulsr 118139564
truedvmdis 130851362
truedvmdii 133934519
addmulii 168634200
mulss 201178348
usqrt 231603484
rtodbl 289710102
addmulii_lg3 472693773
sqrz_i 561096852
sqrr 594045664
mulsi 609230720
sqru 627153010
mulrrz_3 654038794
mulur_2 706523361
mulrrz_3end 774503058
mulur 928467233
mulir 987367835
mului 1107334627
divru 1112886860
affrr 1379004370
addmulii_inplace 1581209184
sqri 1911434351
vals 2266407181
shifti 2269405639
modii 3081718376
mulrrz_end 3599979327
mulrrz_i 3747616491
mulrr 3996018110
muluu 4561379724
mulii 20970292221

Generated by: LCOV version 1.16