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 30218-f32872418f) Lines: 539 571 94.4 %
Date: 2025-04-27 09:18:32 Functions: 52 53 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 186339
mul0r 474008
modiiz 781967
sqrs 1501840
divur 2491761
divir 3492042
truedvmdsi 6202031
divrs 9823096
dbltor 13357386
int2u 25518609
dblexpo 26295771
mantissa_real 52655548
mulrrz_int 55648752
invmod2BIL 60531453
invr_basecase 62439530
invr 62440497
trunc2nr 62641735
addmulii_gen 90718802
int2n 105882494
mulsr 117349446
truedvmdis 129119746
truedvmdii 132267109
addmulii 167026850
mulss 201151530
usqrt 228696560
rtodbl 288222989
addmulii_lg3 467076545
sqrz_i 559330580
sqrr 591911893
mulsi 603862261
sqru 614247003
mulrrz_3 651869570
mulur_2 702882511
mulrrz_3end 772135694
mulur 919659873
mului 933009163
mulir 978329272
divru 1105307121
affrr 1368654769
addmulii_inplace 1568271826
sqri 1887003970
vals 2216972874
shifti 2237118000
modii 3059565933
mulrrz_end 3565279454
mulrrz_i 3714569413
mulrr 3958210816
muluu 4548624440
mulii 20994248961

Generated by: LCOV version 1.16