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.18.1 lcov report (development 29860-8d00374077) Lines: 540 572 94.4 %
Date: 2025-01-07 09:08:55 Functions: 52 53 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addmulii 166868348
addmulii_gen 90321915
addmulii_inplace 1566155696
addmulii_lg3 466149342
affrr 1356532379
dblexpo 26035121
dblmantissa 0
dbltor 13370827
div0r 186462
divir 3494749
divrs 9805112
divru 1095008715
divsi 168
divsr 798
divur 2493899
int2n 102094325
int2u 25486950
int2um1 7644
invmod2BIL 60489636
invr 62380193
invr_basecase 62379334
mantissa_real 52624944
modii 2565932333
modiiz 782234
mul0r 473706
mulii 20690399785
mulir 977244527
mulrr 3938522117
mulrrz_3 649281164
mulrrz_3end 769073266
mulrrz_end 3550651251
mulrrz_i 3697462679
mulrrz_int 54231483
mulsi 603621115
mulsr 116516210
mulss 201097574
mului 900980865
mulur 918628204
mulur_2 701209054
muluu 4415681003
rtodbl 287297581
shifti 2228423099
sqri 1832594667
sqrr 591238137
sqrs 1497360
sqru 605816780
sqrz_i 558947685
truedvmdii 132145568
truedvmdis 129029087
truedvmdsi 6202031
trunc2nr 62463066
usqrt 228973122
vals 2196557403

Generated by: LCOV version 1.16