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-21 09:08:57 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 161
divsr 798
int2um1 7504
div0r 186342
mul0r 473452
modiiz 781881
sqrs 1498402
divur 2493571
divir 3494458
truedvmdsi 6201919
divrs 9806294
dbltor 13371684
int2u 25528919
dblexpo 26034165
mantissa_real 52604868
mulrrz_int 54231420
invmod2BIL 60521402
invr_basecase 62363425
invr 62364489
trunc2nr 62526674
addmulii_gen 90340907
int2n 102221245
mulsr 116558425
truedvmdis 128945506
truedvmdii 132068512
addmulii 167020265
mulss 201097015
usqrt 238325781
rtodbl 287224623
addmulii_lg3 466315838
sqrz_i 558987165
sqrr 591188506
mulsi 603746706
sqru 606433382
mulrrz_3 649613470
mulur_2 701603483
mulrrz_3end 769482680
mului 902276438
mulur 918950407
mulir 977588442
divru 1094988540
affrr 1356602835
addmulii_inplace 1566087719
sqri 1832565769
vals 2203190427
shifti 2229897204
modii 2569604007
mulrrz_end 3551191689
mulrrz_i 3697840185
mulrr 3941452744
muluu 4424109541
mulii 20729269619

Generated by: LCOV version 1.16