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 30586-ccf601f509) Lines: 535 567 94.4 %
Date: 2025-12-26 09:21:14 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168693069
addmulii_gen 90742500
addmulii_inplace 1581415374
addmulii_lg3 472791472
affrr 1343332124
dblexpo 25890383
dblmantissa 0
dbltor 13383689
div0r 186656
divir 3502247
divrs 9871258
divru 1083863604
divsi 175
divsr 798
divur 2508493
int2n 106042987
int2u 26082251
int2um1 8831
invmod2BIL 60827488
invr 62857064
invr_basecase 62856808
mantissa_real 53754110
modii 3080002734
mul0r 482286
mulii 20965091660
mulir 986750906
mulrr 3956652645
mulrrz_3 652646798
mulrrz_3end 773272949
mulrrz_end 3557326686
mulrrz_i 3709811230
mulrrz_int 53801066
mulsi 610700400
mulsr 117452502
mulss 201177854
mului 1108423299
mulur 927912970
mulur_2 705346311
muluu 4560708440
rtodbl 288664588
shifti 2259923168
sqri 1900652372
sqrr 589142938
sqrs 732046
sqru 626865699
sqrz_i 556314240
truedvmdii 134166630
truedvmdis 131085708
truedvmdsi 6202031
trunc2nr 62674537
usqrt 231802827
vals 2275582997

Generated by: LCOV version 1.16