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.14.0 lcov report (development 27775-aca467eab2) Lines: 540 572 94.4 %
Date: 2022-07-03 07:33:15 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 98
divsr 315
int2um1 9793
div0r 170715
modiiz 648808
mul0r 961745
sqrs 1649029
divur 2291657
divir 3413888
divrs 5790591
truedvmdsi 6196889
dbltor 8174582
dblexpo 13014327
int2u 24034220
invr 32447027
invr_basecase 32447226
mantissa_real 43984529
trunc2nr 46240221
invmod2BIL 48652974
mulrrz_int 49951433
int2n 83662776
addmulii_gen 94352896
mulsr 107494390
truedvmdis 132218131
truedvmdii 133978738
mulss 195550201
addmulii 208801300
usqrt 224361407
sqrz_i 386825797
sqrr 402678252
rtodbl 436328169
mulrrz_3 492525443
sqru 493589541
mulsi 572004144
mulrrz_3end 572945908
mulur_2 610696420
addmulii_lg3 642770898
divru 670977219
mulur 799856172
affrr 821783143
mulir 839464633
mului 853453257
addmulii_inplace 1594488114
sqri 1649831815
shifti 1796346345
modii 2148911788
vals 2313620418
mulrrz_end 2495101850
mulrr 2625581892
mulrrz_i 2633886089
muluu 3585910236
mulii 15162507707

Generated by: LCOV version 1.13