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 30256-57c6c2b57f) Lines: 535 567 94.4 %
Date: 2025-05-09 09:19:30 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 186341
mul0r 474020
sqrs 1501020
divur 2491748
divir 3492049
truedvmdsi 6202031
divrs 9823045
dbltor 13357443
int2u 25518781
dblexpo 26298742
mantissa_real 52653196
mulrrz_int 55648752
invmod2BIL 60531463
invr_basecase 62434022
invr 62435114
trunc2nr 62642061
addmulii_gen 90712741
int2n 105882019
mulsr 117353635
truedvmdis 129128590
truedvmdii 132274052
addmulii 167030767
mulss 201150720
usqrt 228760707
rtodbl 288246158
addmulii_lg3 467091248
sqrz_i 559453110
sqrr 591981829
mulsi 603883007
sqru 614279491
mulrrz_3 651982277
mulur_2 703238422
mulrrz_3end 772263344
mulur 920073658
mului 933804617
mulir 978912738
divru 1105695379
affrr 1369432830
addmulii_inplace 1568329056
sqri 1887019620
vals 2217317730
shifti 2237375600
modii 3060976485
mulrrz_end 3565210348
mulrrz_i 3715511100
mulrr 3959197692
muluu 4550580393
mulii 20999160672

Generated by: LCOV version 1.16