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 30347-cb65b7994e) Lines: 535 567 94.4 %
Date: 2025-06-27 09:22:08 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 482294
sqrs 1515229
divur 2493724
divir 3494599
truedvmdsi 6202031
divrs 9961771
dbltor 13374332
int2u 25997147
dblexpo 26510096
mantissa_real 53498293
mulrrz_int 55651412
invmod2BIL 60593127
trunc2nr 62678770
invr_basecase 63115525
invr 63116175
addmulii_gen 90731341
int2n 106752202
mulsr 118067329
truedvmdis 130851209
truedvmdii 133931599
addmulii 168623400
mulss 201149304
usqrt 229938086
rtodbl 289977966
addmulii_lg3 472266682
sqrz_i 560372207
sqrr 593353746
mulsi 604453455
sqru 616615918
mulrrz_3 653824439
mulur_2 704254175
mulrrz_3end 774217435
mulur 922691972
mului 937512026
mulir 981536445
divru 1112549300
affrr 1378828104
addmulii_inplace 1575416505
sqri 1898843533
vals 2249900898
shifti 2257137416
modii 3077249517
mulrrz_end 3580745728
mulrrz_i 3729379934
mulrr 3977167740
muluu 4571766022
mulii 21111227692

Generated by: LCOV version 1.16