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 30106-3f17b77578) Lines: 540 572 94.4 %
Date: 2025-03-31 09:19:50 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 186309
mul0r 473903
modiiz 781922
sqrs 1500525
divur 2494461
divir 3494784
truedvmdsi 6202031
divrs 9815450
dbltor 13394243
int2u 25518312
dblexpo 26116172
mantissa_real 52657853
mulrrz_int 54617680
invmod2BIL 60494064
invr_basecase 62416768
invr 62417024
trunc2nr 62641439
addmulii_gen 90718213
int2n 104064760
mulsr 116726998
truedvmdis 129139578
truedvmdii 132283944
addmulii 167020826
mulss 201098469
usqrt 228580797
rtodbl 288124609
addmulii_lg3 467089395
sqrz_i 559427767
sqrr 592111336
mulsi 603728988
sqru 613992289
mulrrz_3 651620044
mulur_2 702122064
mulrrz_3end 771657249
mulur 919567733
mului 932504914
mulir 978328243
divru 1097655358
affrr 1360565947
addmulii_inplace 1568226662
sqri 1882202535
vals 2214207716
shifti 2233621763
modii 3053290639
mulrrz_end 3555847540
mulrrz_i 3702281625
mulrr 3949065928
muluu 4507369044
mulii 20916143471

Generated by: LCOV version 1.16