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 29115-f22e516b23) Lines: 540 572 94.4 %
Date: 2024-04-29 08:07: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 133
divsr 729
int2um1 7504
div0r 186005
modiiz 777265
mul0r 950236
sqrs 1488650
divur 2430953
divir 3450254
truedvmdsi 6197775
divrs 9311823
dbltor 12819563
int2u 22669612
dblexpo 23630861
mulrrz_int 52342943
mantissa_real 53401928
invmod2BIL 60017336
invr_basecase 60024384
invr 60024753
trunc2nr 60484003
int2n 100724342
mulsr 116228567
truedvmdis 126252008
addmulii_gen 128318470
truedvmdii 129483391
mulss 196170623
addmulii 216611872
usqrt 217926215
rtodbl 284521633
sqrz_i 540408357
sqrr 570602025
sqru 587927757
mulsi 637671620
addmulii_lg3 640299753
mulrrz_3 642117208
mulur_2 694645874
mulrrz_3end 758696683
mului 923381254
mulur 931584017
mulir 990265070
divru 1045594323
affrr 1317080801
sqri 1801361748
addmulii_inplace 1946882784
shifti 2163014977
vals 2189795077
modii 2502818709
mulrrz_end 3456353944
mulrrz_i 3609446820
mulrr 3875185750
muluu 4033556079
mulii 17405101903

Generated by: LCOV version 1.14