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 30587-f85873d515) Lines: 535 567 94.4 %
Date: 2025-12-29 09:21:39 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 186653
mul0r 482272
sqrs 732033
divur 2508493
divir 3502243
truedvmdsi 6202031
divrs 9871264
dbltor 13383762
dblexpo 25892124
int2u 26082657
mantissa_real 53751595
mulrrz_int 53801066
invmod2BIL 60827532
trunc2nr 62673460
invr_basecase 62850567
invr 62850769
addmulii_gen 90744049
int2n 106040337
mulsr 117477860
truedvmdis 131087914
truedvmdii 134171629
addmulii 168692642
mulss 201178302
usqrt 231797943
rtodbl 288678889
addmulii_lg3 472785577
sqrz_i 556282571
sqrr 589113290
mulsi 610695639
sqru 626922711
mulrrz_3 652641724
mulur_2 705584376
mulrrz_3end 773274255
mulur 928216026
mulir 987118887
divru 1083983192
mului 1110898777
affrr 1343730783
addmulii_inplace 1581423216
sqri 1901434421
shifti 2260294475
vals 2276239442
modii 3082475569
mulrrz_end 3557216544
mulrrz_i 3710380345
mulrr 3956798609
muluu 4568707970
mulii 20977078359

Generated by: LCOV version 1.16