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 30482-15ec328664) Lines: 535 567 94.4 %
Date: 2025-09-03 09:23:58 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 187457
mul0r 482290
sqrs 732031
divur 2506943
divir 3501369
truedvmdsi 6202031
divrs 9865358
dbltor 13387037
int2u 26153776
dblexpo 26463203
mantissa_real 53600627
mulrrz_int 55660756
invmod2BIL 60744273
trunc2nr 62695286
invr_basecase 63104428
invr 63104646
addmulii_gen 90730584
int2n 105911066
mulsr 118140813
truedvmdis 130874288
truedvmdii 133955944
addmulii 168634764
mulss 201178577
usqrt 231707596
rtodbl 289704472
addmulii_lg3 472675859
sqrz_i 561044578
sqrr 594008725
mulsi 609261815
sqru 627147206
mulrrz_3 653939974
mulur_2 706540239
mulrrz_3end 774381644
mulur 928487996
mulir 987313398
mului 1107580915
divru 1112893851
affrr 1379014032
addmulii_inplace 1581176328
sqri 1911721909
vals 2266455705
shifti 2269470886
modii 3082099017
mulrrz_end 3600142464
mulrrz_i 3747581798
mulrr 3995991361
muluu 4563106789
mulii 20972826562

Generated by: LCOV version 1.16