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

Generated by: LCOV version 1.16