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 30590-f14e077362) Lines: 535 567 94.4 %
Date: 2025-12-31 09:21:49 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 186655
mul0r 482271
sqrs 732961
divur 2508494
divir 3502241
truedvmdsi 6202031
divrs 9871335
dbltor 13384262
dblexpo 25895044
int2u 26082273
mantissa_real 53752425
mulrrz_int 53801066
invmod2BIL 60827512
trunc2nr 62682213
invr_basecase 62853061
invr 62853094
addmulii_gen 90740552
int2n 106045727
mulsr 117494805
truedvmdis 131084377
truedvmdii 134166842
addmulii 168683965
mulss 201179232
usqrt 231911956
rtodbl 288699779
addmulii_lg3 472796922
sqrz_i 556484650
sqrr 589268434
mulsi 610678398
sqru 626978307
mulrrz_3 652918833
mulur_2 705592068
mulrrz_3end 773657499
mulur 928246861
mulir 987096848
divru 1084191713
mului 1110766946
affrr 1344352111
addmulii_inplace 1581425066
sqri 1901705341
shifti 2260743759
vals 2276374030
modii 3083602425
mulrrz_end 3557517509
mulrrz_i 3712002658
mulrr 3957935584
muluu 4572649813
mulii 20983314336

Generated by: LCOV version 1.16