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-03 09:18:42 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 186270
mul0r 473865
sqrs 1500775
divur 2491761
divir 3491959
truedvmdsi 6202031
divrs 9823207
dbltor 13362906
int2u 25561146
dblexpo 26348492
mantissa_real 52692150
mulrrz_int 55648770
invmod2BIL 60535269
invr_basecase 62471071
invr 62471508
trunc2nr 62648338
addmulii_gen 90727534
int2n 105928998
mulsr 117453044
truedvmdis 129172851
truedvmdii 132316283
addmulii 167035581
mulss 201150471
usqrt 228564510
rtodbl 288539225
addmulii_lg3 467032194
sqrz_i 559354709
sqrr 592058276
mulsi 603911056
sqru 614329767
mulrrz_3 651981760
mulur_2 703010420
mulrrz_3end 772203588
mulur 919894109
mului 931517631
mulir 978607549
divru 1106396863
affrr 1370163821
addmulii_inplace 1568343427
sqri 1887931117
vals 2218500181
shifti 2238514803
modii 3059112485
mulrrz_end 3569506478
mulrrz_i 3717271840
mulrr 3962049488
muluu 4547233956
mulii 21012133484

Generated by: LCOV version 1.16