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/gmp - mp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30552-d1d0643eee) Lines: 683 719 95.0 %
Date: 2025-11-22 09:22:46 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
addumului 0
pari_gmp_realloc 0
pari_kernel_version 4
pari_kernel_close 1104
pari_kernel_init 1112
incneg 66684
resetloop 174328
diviuuexact 200480
muluui 222695
divis 325422
convi 439612
pari_gmp_free 1755952
setloop 2999293
truncr 3460047
sqrtremi 5162148
xmpn_copy 6897108
floorr 6946702
diviuexact 31836951
red_montgomery 35071725
divri_with_gmp 35251703
remi2n 39046202
sqrispec_mirror 40037281
icopy_ef 41494636
absdiviu_rem 51008945
mpz2GEN 57765071
divrr_with_gmp 76237268
muliispec_mirror 83227893
divis_rem 86247352
incpos 103195391
incloop 103602943
GEN2mpz 115527343
sqrtr_abs 126364449
mantissa2nr 138304465
divrr 142527949
divri 151468336
xmpn_zero 237560677
equaliispec 268857601
int_normalize 307278730
affir 404191734
diviuexact_i 413205169
roundr_up_ip 518402516
diviiexact 533885606
xmpn_mirror 584302651
xmpn_mirrorcopy 713744848
shiftispec 720207711
adduispec_offset 764312957
sqrispec 1031022734
umodiu 1331815974
subiuspec 1778998259
dvmdii 2196991018
adduispec 2790831805
subiispec 3023822283
addiispec 3337040516
cmpiispec 3980087821
muluispec 5600504170
muliispec 5839792740

Generated by: LCOV version 1.16