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

Generated by: LCOV version 1.16