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 30569-8181146aa1) Lines: 535 567 94.4 %
Date: 2025-12-04 09:22:12 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 187468
mul0r 482276
sqrs 731707
divur 2509421
divir 3503680
truedvmdsi 6202031
divrs 9872230
dbltor 13390302
dblexpo 25893226
int2u 26159423
mantissa_real 53759137
mulrrz_int 53801120
invmod2BIL 60843945
trunc2nr 62693382
invr_basecase 62837965
invr 62839043
addmulii_gen 90709058
int2n 106078613
mulsr 117515632
truedvmdis 131088912
truedvmdii 134175180
addmulii 168699446
mulss 201178530
usqrt 231362396
rtodbl 288932368
addmulii_lg3 472808265
sqrz_i 556292585
sqrr 589172140
mulsi 610669479
sqru 627029605
mulrrz_3 652615128
mulur_2 705501907
mulrrz_3end 773301390
mulur 928137203
mulir 986860709
divru 1083764352
mului 1107203127
affrr 1343440759
addmulii_inplace 1581404370
sqri 1911584025
vals 2268087615
shifti 2269656304
modii 3082452451
mulrrz_end 3556983480
mulrrz_i 3710139583
mulrr 3958239272
muluu 4567497801
mulii 20984835332

Generated by: LCOV version 1.16