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 30552-d1d0643eee) Lines: 535 567 94.4 %
Date: 2025-11-22 09:22:46 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 187460
mul0r 482256
sqrs 731937
divur 2509302
divir 3503623
truedvmdsi 6202031
divrs 9871155
dbltor 13389099
dblexpo 25889112
int2u 26155844
mantissa_real 53609770
mulrrz_int 53800761
invmod2BIL 60743974
trunc2nr 62695604
invr_basecase 62844435
invr 62844825
addmulii_gen 90731550
int2n 105934829
mulsr 117496454
truedvmdis 130874419
truedvmdii 133954774
addmulii 168631841
mulss 201178600
usqrt 231480183
rtodbl 288869284
addmulii_lg3 472685905
sqrz_i 555565688
sqrr 588449735
mulsi 609234185
sqru 626963789
mulrrz_3 652526328
mulur_2 704564279
mulrrz_3end 773121602
mulur 927100635
mulir 985897222
divru 1083455236
mului 1109189492
affrr 1342970162
addmulii_inplace 1581208531
sqri 1912235543
vals 2267244370
shifti 2269143038
modii 3083748009
mulrrz_end 3555542672
mulrrz_i 3708838800
mulrr 3955598408
muluu 4561877461
mulii 20969836467

Generated by: LCOV version 1.16