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 30368-f792e9816c) Lines: 535 567 94.4 %
Date: 2025-07-04 09:22:57 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168626022
addmulii_gen 90736971
addmulii_inplace 1575366257
addmulii_lg3 472262805
affrr 1379420903
dblexpo 26510839
dblmantissa 0
dbltor 13374427
div0r 187461
divir 3501403
divrs 9961870
divru 1113321687
divsi 175
divsr 798
divur 2500509
int2n 106860517
int2u 25997130
int2um1 8831
invmod2BIL 60666760
invr 63116232
invr_basecase 63115752
mantissa_real 53501008
modii 3082975223
mul0r 482306
mulii 21118589711
mulir 986460751
mulrr 3995594500
mulrrz_3 654789328
mulrrz_3end 775175483
mulrrz_end 3598874317
mulrrz_i 3746949369
mulrrz_int 55660643
mulsi 604828638
mulsr 118193619
mulss 201175855
mului 944597778
mulur 927554328
mulur_2 706080876
muluu 4578688598
rtodbl 290110880
shifti 2257415713
sqri 1900398165
sqrr 594187030
sqrs 1541148
sqru 617983805
sqrz_i 561187626
truedvmdii 133935533
truedvmdis 130854848
truedvmdsi 6202031
trunc2nr 62687898
usqrt 230493475
vals 2253792790

Generated by: LCOV version 1.16