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 30316-0578a48613) Lines: 535 567 94.4 %
Date: 2025-06-04 09:19:51 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 186265
mul0r 473869
sqrs 1499954
divur 2491758
divir 3491951
truedvmdsi 6202031
divrs 9823225
dbltor 13362871
int2u 25561641
dblexpo 26350216
mantissa_real 52690343
mulrrz_int 55648770
invmod2BIL 60535326
invr_basecase 62471547
invr 62471815
trunc2nr 62647785
addmulii_gen 90728903
int2n 105927882
mulsr 117444894
truedvmdis 129166425
truedvmdii 132310218
addmulii 167034062
mulss 201149440
usqrt 228673410
rtodbl 288553824
addmulii_lg3 467036855
sqrz_i 559367585
sqrr 592038242
mulsi 603916484
sqru 614361819
mulrrz_3 651990574
mulur_2 703033078
mulrrz_3end 772208657
mulur 919986076
mului 934095293
mulir 978670198
divru 1106458044
affrr 1370307800
addmulii_inplace 1568358413
sqri 1888503292
vals 2218369878
shifti 2238661960
modii 3061586426
mulrrz_end 3569451549
mulrrz_i 3717632707
mulrr 3962325497
muluu 4548607659
mulii 21016897199

Generated by: LCOV version 1.16