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 30558-88b7dc3357) Lines: 535 567 94.4 %
Date: 2025-11-26 09:22:00 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 187451
mul0r 482277
sqrs 732276
divur 2509319
divir 3503611
truedvmdsi 6202031
divrs 9871064
dbltor 13388676
dblexpo 25893126
int2u 26156076
mantissa_real 53608688
mulrrz_int 53800761
invmod2BIL 60743984
trunc2nr 62692405
invr_basecase 62838340
invr 62839274
addmulii_gen 90733961
int2n 105931920
mulsr 117500972
truedvmdis 130865761
truedvmdii 133950089
addmulii 168643637
mulss 201178799
usqrt 231945902
rtodbl 288895088
addmulii_lg3 472717275
sqrz_i 555689987
sqrr 588557859
mulsi 609223517
sqru 626985025
mulrrz_3 652602505
mulur_2 704747281
mulrrz_3end 773279271
mulur 927288108
mulir 986031007
divru 1083626882
mului 1108343061
affrr 1343449528
addmulii_inplace 1581329407
sqri 1911563932
vals 2267056540
shifti 2269384794
modii 3083674297
mulrrz_end 3555807468
mulrrz_i 3709890222
mulrr 3956176210
muluu 4563881362
mulii 20974684137

Generated by: LCOV version 1.16