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

Generated by: LCOV version 1.16