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.0 lcov report (development 29806-4d001396c7) Lines: 540 572 94.4 %
Date: 2024-12-22 09:08:28 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 167010690
addmulii_gen 90377515
addmulii_inplace 1566245216
addmulii_lg3 466317526
affrr 1356669595
dblexpo 26033540
dblmantissa 0
dbltor 13371351
div0r 186344
divir 3494461
divrs 9806274
divru 1095048606
divsi 161
divsr 798
divur 2493551
int2n 102221987
int2u 25528969
int2um1 7504
invmod2BIL 60521424
invr 62390718
invr_basecase 62389693
mantissa_real 52610550
modii 2570350416
modiiz 781886
mul0r 473473
mulii 20729131062
mulir 977292583
mulrr 3939729029
mulrrz_3 649593578
mulrrz_3end 769443334
mulrrz_end 3551433236
mulrrz_i 3697962349
mulrrz_int 54231420
mulsi 603789816
mulsr 116554321
mulss 201096045
mului 902616340
mulur 918693792
mulur_2 701346918
muluu 4424223645
rtodbl 287321519
shifti 2229771093
sqri 1832659059
sqrr 591196888
sqrs 1498117
sqru 606415794
sqrz_i 559001086
truedvmdii 132087846
truedvmdis 128964435
truedvmdsi 6201919
trunc2nr 62524302
usqrt 238150883
vals 2203087560

Generated by: LCOV version 1.16