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.16.2 lcov report (development 29115-f22e516b23) Lines: 540 572 94.4 %
Date: 2024-04-24 08:07:32 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 133
divsr 729
int2um1 7504
div0r 185996
modiiz 777268
mul0r 950259
sqrs 1488284
divur 2430948
divir 3450240
truedvmdsi 6197775
divrs 9311716
dbltor 12819229
int2u 22669086
dblexpo 23629649
mulrrz_int 52342943
mantissa_real 53392603
invr_basecase 59984747
invr 59985159
invmod2BIL 60017324
trunc2nr 60478177
int2n 100717944
mulsr 116211797
truedvmdis 126198281
addmulii_gen 128305178
truedvmdii 129429541
mulss 196170594
addmulii 216595581
usqrt 218154734
rtodbl 284512936
sqrz_i 540325500
sqrr 570543103
sqru 587889285
mulsi 637512339
addmulii_lg3 640184720
mulrrz_3 642066848
mulur_2 694484092
mulrrz_3end 758644491
mului 922905722
mulur 931373862
mulir 990026645
divru 1045528107
affrr 1316882109
sqri 1801021441
addmulii_inplace 1946645181
shifti 2162760583
vals 2189680113
modii 2502433585
mulrrz_end 3455820240
mulrrz_i 3609322950
mulrr 3877970119
muluu 4032785172
mulii 17403226056

Generated by: LCOV version 1.14