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
addmulii 167026850
addmulii_gen 90718802
addmulii_inplace 1568271826
addmulii_lg3 467076545
affrr 1368654769
dblexpo 26295771
dblmantissa 0
dbltor 13357386
div0r 186339
divir 3492042
divrs 9823096
divru 1105307121
divsi 175
divsr 798
divur 2491761
int2n 105882494
int2u 25518609
int2um1 8831
invmod2BIL 60531453
invr 62440497
invr_basecase 62439530
mantissa_real 52655548
modii 3059565933
modiiz 781967
mul0r 474008
mulii 20994248961
mulir 978329272
mulrr 3958210816
mulrrz_3 651869570
mulrrz_3end 772135694
mulrrz_end 3565279454
mulrrz_i 3714569413
mulrrz_int 55648752
mulsi 603862261
mulsr 117349446
mulss 201151530
mului 933009163
mulur 919659873
mulur_2 702882511
muluu 4548624440
rtodbl 288222989
shifti 2237118000
sqri 1887003970
sqrr 591911893
sqrs 1501840
sqru 614247003
sqrz_i 559330580
truedvmdii 132267109
truedvmdis 129119746
truedvmdsi 6202031
trunc2nr 62641735
usqrt 228696560
vals 2216972874

Generated by: LCOV version 1.16