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 30573-61accf17c8) Lines: 535 567 94.4 %
Date: 2025-12-15 09:22:15 Functions: 51 52 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
dblmantissa 0
divsi 175
divsr 798
int2um1 8831
div0r 187468
mul0r 482281
sqrs 731714
divur 2509428
divir 3503681
truedvmdsi 6202031
divrs 9872217
dbltor 13390428
dblexpo 25894009
int2u 26159402
mantissa_real 53762666
mulrrz_int 53801120
invmod2BIL 60843948
trunc2nr 62692903
invr_basecase 62862720
invr 62863528
addmulii_gen 90748497
int2n 106079342
mulsr 117503812
truedvmdis 131115865
truedvmdii 134202293
addmulii 168701150
mulss 201178477
usqrt 231848331
rtodbl 288950249
addmulii_lg3 472830906
sqrz_i 556367701
sqrr 589191673
mulsi 610725073
sqru 627043368
mulrrz_3 652720892
mulur_2 705578880
mulrrz_3end 773447674
mulur 928239013
mulir 987003977
divru 1083817384
mului 1107186367
affrr 1343589661
addmulii_inplace 1581462546
sqri 1911740131
vals 2268471096
shifti 2269736761
modii 3083574481
mulrrz_end 3557209625
mulrrz_i 3710833468
mulrr 3956844130
muluu 4568416521
mulii 20988176175

Generated by: LCOV version 1.16