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 30502-9830c20844) Lines: 535 567 94.4 %
Date: 2025-09-22 09:23:52 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 482270
sqrs 730712
divur 2509149
divir 3503539
truedvmdsi 6202031
divrs 9869656
dbltor 13387382
int2u 26154399
dblexpo 26478948
mantissa_real 53611035
mulrrz_int 55696529
invmod2BIL 60744213
trunc2nr 62695909
invr_basecase 63132243
invr 63132729
addmulii_gen 90732629
int2n 105936092
mulsr 118162549
truedvmdis 130876487
truedvmdii 133955616
addmulii 168641252
mulss 201177301
usqrt 231595551
rtodbl 289715369
addmulii_lg3 472719045
sqrz_i 561451521
sqrr 594373968
mulsi 609236109
sqru 627350477
mulrrz_3 654213639
mulur_2 706351264
mulrrz_3end 774749338
mulur 928442399
mulir 987380471
mului 1109730775
divru 1113194012
affrr 1379670917
addmulii_inplace 1581286187
sqri 1912137068
vals 2267133432
shifti 2270152232
modii 3083459106
mulrrz_end 3601679550
mulrrz_i 3750317148
mulrr 3998094110
muluu 4562864782
mulii 20975528193

Generated by: LCOV version 1.16