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

Generated by: LCOV version 1.14