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 29857-ff9b6c6cb1) Lines: 540 572 94.4 %
Date: 2025-01-06 09:09:01 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
divsi 168
divsr 798
int2um1 7644
div0r 186466
mul0r 473679
modiiz 782229
sqrs 1496659
divur 2493895
divir 3494761
truedvmdsi 6202031
divrs 9805154
dbltor 13370974
int2u 25487189
dblexpo 26034756
mantissa_real 52621125
mulrrz_int 54231507
invmod2BIL 60489620
invr_basecase 62350735
invr 62351765
trunc2nr 62465991
addmulii_gen 90285672
int2n 102095951
mulsr 116510051
truedvmdis 128999734
truedvmdii 132115651
addmulii 166871194
mulss 201097614
usqrt 228666159
rtodbl 287229996
addmulii_lg3 466125732
sqrz_i 558951285
sqrr 591279203
mulsi 603562170
sqru 605830903
mulrrz_3 649324092
mulur_2 701249394
mulrrz_3end 769149654
mului 901217945
mulur 918679617
mulir 977251144
divru 1095161183
affrr 1356694808
addmulii_inplace 1566034251
sqri 1832691985
vals 2196658781
shifti 2228564951
modii 2565611644
mulrrz_end 3550697950
mulrrz_i 3697398717
mulrr 3940526806
muluu 4414762780
mulii 20688988202

Generated by: LCOV version 1.16