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 29419-8afb0ed749) Lines: 540 572 94.4 %
Date: 2024-07-02 09:03:41 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 770
int2um1 7504
div0r 186019
modiiz 776707
mul0r 1002505
sqrs 1488199
divur 2491262
divir 3494129
truedvmdsi 6197775
divrs 9798644
dbltor 13245878
int2u 23067709
dblexpo 26094619
mantissa_real 53166709
mulrrz_int 54482804
invmod2BIL 58339909
invr_basecase 61743833
invr 61744128
trunc2nr 62277028
addmulii_gen 86912149
int2n 100940931
mulsr 116213217
truedvmdis 126844317
truedvmdii 129949415
addmulii 166726662
mulss 201097340
usqrt 229353403
rtodbl 286664433
addmulii_lg3 444781996
sqrz_i 560775546
sqrr 592282413
sqru 604768287
mulsi 608985353
mulrrz_3 649818679
mulur_2 701237281
mulrrz_3end 769348024
mului 914064984
mulur 928621610
mulir 987814679
divru 1095799185
affrr 1355909144
addmulii_inplace 1498650359
sqri 1830290208
vals 2182231869
shifti 2196289903
modii 2510744150
mulrrz_end 3533302256
mulrrz_i 3676726084
mulrr 3922217929
muluu 4300761288
mulii 18975498117

Generated by: LCOV version 1.16