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

Generated by: LCOV version 1.16