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 30338-25bc3391a4) Lines: 535 567 94.4 %
Date: 2025-06-22 09:20:59 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 187458
mul0r 482287
sqrs 1516121
divur 2493724
divir 3494600
truedvmdsi 6202031
divrs 9961725
dbltor 13374295
int2u 25997443
dblexpo 26513297
mantissa_real 53500294
mulrrz_int 55648789
invmod2BIL 60593143
trunc2nr 62669601
invr_basecase 63103042
invr 63103778
addmulii_gen 90709946
int2n 106751662
mulsr 118052069
truedvmdis 130810642
truedvmdii 133896560
addmulii 168621743
mulss 201150200
usqrt 229743993
rtodbl 289912132
addmulii_lg3 472239333
sqrz_i 560455415
sqrr 593281592
mulsi 604403178
sqru 616572835
mulrrz_3 654069387
mulur_2 704339554
mulrrz_3end 774645191
mulur 922833131
mului 937761268
mulir 981575294
divru 1112745121
affrr 1378993007
addmulii_inplace 1575326933
sqri 1899943196
vals 2250031708
shifti 2257281108
modii 3078355048
mulrrz_end 3580951975
mulrrz_i 3732021214
mulrr 3979423894
muluu 4573641954
mulii 21097562074

Generated by: LCOV version 1.16