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 30589-01bb95f8b7) Lines: 535 567 94.4 %
Date: 2025-12-30 09:21:31 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 186656
mul0r 482273
sqrs 732695
divur 2508490
divir 3502246
truedvmdsi 6202031
divrs 9871303
dbltor 13383939
dblexpo 25892360
int2u 26081979
mantissa_real 53754481
mulrrz_int 53801066
invmod2BIL 60827525
trunc2nr 62677190
invr_basecase 62857972
invr 62858354
addmulii_gen 90751328
int2n 106042416
mulsr 117497018
truedvmdis 131094672
truedvmdii 134177967
addmulii 168679510
mulss 201178606
usqrt 231899445
rtodbl 288666919
addmulii_lg3 472744212
sqrz_i 556332718
sqrr 589152950
mulsi 610712637
sqru 626903668
mulrrz_3 652666572
mulur_2 705430701
mulrrz_3end 773304493
mulur 928043946
mulir 986855899
divru 1083912963
mului 1109597684
affrr 1343783589
addmulii_inplace 1581369918
sqri 1901062678
shifti 2259956909
vals 2275685553
modii 3081287508
mulrrz_end 3557321491
mulrrz_i 3710503910
mulrr 3956914861
muluu 4568355618
mulii 20974632097

Generated by: LCOV version 1.16