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 30540-a74e376001) Lines: 535 567 94.4 %
Date: 2025-11-08 09:22:52 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 168638009
addmulii_gen 90706094
addmulii_inplace 1581128017
addmulii_lg3 472662272
affrr 1342858912
dblexpo 25880158
dblmantissa 0
dbltor 13388237
div0r 187459
divir 3503343
divrs 9869805
divru 1083331247
divsi 175
divsr 798
divur 2509030
int2n 105930973
int2u 26155396
int2um1 8831
invmod2BIL 60744900
invr 62801438
invr_basecase 62800920
mantissa_real 53605149
modii 3083234966
mul0r 482300
mulii 20970540698
mulir 985619766
mulrr 3957071087
mulrrz_3 652473211
mulrrz_3end 773073517
mulrrz_end 3554848865
mulrrz_i 3708636024
mulrrz_int 53800594
mulsi 609177061
mulsr 117467420
mulss 201177784
mului 1107698791
mulur 926898468
mulur_2 704379747
muluu 4561877923
rtodbl 288855603
shifti 2269009001
sqri 1911691614
sqrr 588440825
sqrs 731505
sqru 626949400
sqrz_i 555555612
truedvmdii 133924022
truedvmdis 130845160
truedvmdsi 6202031
trunc2nr 62692833
usqrt 231639552
vals 2267189487

Generated by: LCOV version 1.16