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 30547-1b347192b6) Lines: 535 567 94.4 %
Date: 2025-11-13 09:22:32 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168637551
addmulii_gen 90724885
addmulii_inplace 1581214375
addmulii_lg3 472690070
affrr 1343135966
dblexpo 25889328
dblmantissa 0
dbltor 13388892
div0r 187460
divir 3503626
divrs 9871067
divru 1083535629
divsi 175
divsr 798
divur 2509304
int2n 105933314
int2u 26155840
int2um1 8831
invmod2BIL 60744905
invr 62838336
invr_basecase 62837936
mantissa_real 53608352
modii 3083883373
mul0r 482326
mulii 20971651634
mulir 985861298
mulrr 3955931687
mulrrz_3 652589618
mulrrz_3end 773205962
mulrrz_end 3555450840
mulrrz_i 3709204414
mulrrz_int 53800594
mulsi 609237172
mulsr 117496699
mulss 201178045
mului 1107969103
mulur 927137288
mulur_2 704590933
muluu 4562151316
rtodbl 288891951
shifti 2269108578
sqri 1911749166
sqrr 588433928
sqrs 731436
sqru 626925799
sqrz_i 555570541
truedvmdii 133946324
truedvmdis 130866472
truedvmdsi 6202031
trunc2nr 62692431
usqrt 231890732
vals 2267570482

Generated by: LCOV version 1.16