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 30370-b9c4b6d044) Lines: 535 567 94.4 %
Date: 2025-07-05 09:22:59 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 482289
sqrs 1541068
divur 2500519
divir 3501404
truedvmdsi 6202031
divrs 9961861
dbltor 13374214
int2u 25997629
dblexpo 26511282
mantissa_real 53495638
mulrrz_int 55660619
invmod2BIL 60666793
trunc2nr 62687174
invr_basecase 63090895
invr 63091190
addmulii_gen 90695856
int2n 106859198
mulsr 118188532
truedvmdis 130802907
truedvmdii 133884517
addmulii 168633184
mulss 201176034
usqrt 230559649
rtodbl 290081277
addmulii_lg3 472267451
sqrz_i 561199523
sqrr 594210485
mulsi 604762521
sqru 617955566
mulrrz_3 654773120
mulur_2 705882721
mulrrz_3end 775148101
mulur 927410514
mului 945537890
mulir 986230278
divru 1113435900
affrr 1379418603
addmulii_inplace 1575252757
sqri 1900497648
vals 2254060703
shifti 2257464665
modii 3083248725
mulrrz_end 3598610925
mulrrz_i 3746495271
mulrr 3997581862
muluu 4578853775
mulii 21118386235

Generated by: LCOV version 1.16