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
addmulii 168643637
addmulii_gen 90733961
addmulii_inplace 1581329407
addmulii_lg3 472717275
affrr 1343449528
dblexpo 25893126
dblmantissa 0
dbltor 13388676
div0r 187451
divir 3503611
divrs 9871064
divru 1083626882
divsi 175
divsr 798
divur 2509319
int2n 105931920
int2u 26156076
int2um1 8831
invmod2BIL 60743984
invr 62839274
invr_basecase 62838340
mantissa_real 53608688
modii 3083674297
mul0r 482277
mulii 20974684137
mulir 986031007
mulrr 3956176210
mulrrz_3 652602505
mulrrz_3end 773279271
mulrrz_end 3555807468
mulrrz_i 3709890222
mulrrz_int 53800761
mulsi 609223517
mulsr 117500972
mulss 201178799
mului 1108343061
mulur 927288108
mulur_2 704747281
muluu 4563881362
rtodbl 288895088
shifti 2269384794
sqri 1911563932
sqrr 588557859
sqrs 732276
sqru 626985025
sqrz_i 555689987
truedvmdii 133950089
truedvmdis 130865761
truedvmdsi 6202031
trunc2nr 62692405
usqrt 231945902
vals 2267056540

Generated by: LCOV version 1.16