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 29465-f396510193) Lines: 540 572 94.4 %
Date: 2024-07-25 09:03:53 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 776716
mul0r 1002528
sqrs 1492308
divur 2491257
divir 3494123
truedvmdsi 6197775
divrs 9798693
dbltor 13246125
int2u 23068298
dblexpo 26096835
mantissa_real 53171913
mulrrz_int 54482732
invmod2BIL 58335848
invr 61755100
invr_basecase 61755118
trunc2nr 62285124
addmulii_gen 86924847
int2n 100948512
mulsr 116230534
truedvmdis 126834617
truedvmdii 129940889
addmulii 166729150
mulss 201102091
usqrt 229745970
rtodbl 286687975
addmulii_lg3 444795403
sqrz_i 560951607
sqrr 592344232
sqru 604863263
mulsi 609016393
mulrrz_3 650243793
mulur_2 701824544
mulrrz_3end 769929996
mului 892642814
mulur 919677682
mulir 979070726
divru 1095908559
affrr 1356264226
addmulii_inplace 1498724672
sqri 1830860955
vals 2183385409
shifti 2197302050
modii 2475898676
mulrrz_end 3533996683
mulrrz_i 3678363012
mulrr 3924081668
muluu 4306328495
mulii 19044135038

Generated by: LCOV version 1.16