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 30861-40e9da58f9) Lines: 532 567 93.8 %
Date: 2026-05-04 09:27:01 Functions: 50 52 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
div0r 0
divsi 175
divsr 798
int2um1 8831
mul0r 481899
sqrs 733083
divur 2455875
divir 3279562
truedvmdsi 6202318
divrs 10047513
dbltor 13395458
int2u 25350336
dblexpo 27277743
mulrrz_int 53799463
mantissa_real 54202190
invmod2BIL 60850142
trunc2nr 62833961
invr_basecase 65204320
invr 65204366
addmulii_gen 90658394
int2n 108759418
mulsr 120408867
truedvmdis 138811338
truedvmdii 141894625
addmulii 168809984
mulss 201179066
usqrt 251655576
rtodbl 295480040
addmulii_lg3 475574079
sqrz_i 563174077
sqrr 597482349
mulsi 617787677
sqru 639870355
mulrrz_3 658869085
mulur_2 723224806
mulrrz_3end 779836892
mulur 945854893
mulir 995564773
mului 1112835661
divru 1118684879
affrr 1380100513
addmulii_inplace 1617793194
sqri 2078102091
shifti 2288047524
vals 2319616669
modii 3124492232
mulrrz_end 3649173042
mulrrz_i 3801357085
mulrr 4054945872
muluu 4652698799
mulii 21157656406

Generated by: LCOV version 1.16