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.1 lcov report (development 28676-df828f1c94) Lines: 540 572 94.4 %
Date: 2023-08-26 07:54:43 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 216796271
addmulii_gen 101820642
addmulii_inplace 1540804112
addmulii_lg3 614234147
affrr 936634444
dblexpo 15442321
dblmantissa 0
dbltor 8319537
div0r 185807
divir 3583233
divrs 6992845
divru 754458981
divsi 119
divsr 315
divur 2453063
int2n 84725226
int2u 23508167
int2um1 7497
invmod2BIL 58871755
invr 35790153
invr_basecase 35790712
mantissa_real 31586518
modii 2548364507
modiiz 781304
mul0r 993146
mulii 15656071121
mulir 849003434
mulrr 2746182453
mulrrz_3 526722974
mulrrz_3end 609553672
mulrrz_end 2590068813
mulrrz_i 2753311765
mulrrz_int 49804377
mulsi 504532052
mulsr 113034744
mulss 196165605
mului 1067072686
mulur 797172150
mulur_2 638137046
muluu 3827242177
rtodbl 447699883
shifti 1989259108
sqri 1761348574
sqrr 401482556
sqrs 1487668
sqru 557500098
sqrz_i 385451656
truedvmdii 117737767
truedvmdis 115586533
truedvmdsi 6197775
trunc2nr 46820142
usqrt 225466933
vals 2121902105

Generated by: LCOV version 1.14