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 29950-285c5b69ed) Lines: 683 719 95.0 %
Date: 2025-02-05 09:09:51 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 115255583
absdiviu_rem 105435152
addiispec 3260021332
adduispec 2585929130
adduispec_offset 580080223
addumului 0
affir 400323259
cmpiispec 3824535117
convi 437311
diviiexact 504448325
divis 966662
divis_rem 85160471
diviuexact 30764276
diviuexact_i 386445820
diviuuexact 199479
divri 150175387
divri_with_gmp 35169038
divrr 141780962
divrr_with_gmp 75721955
dvmdii 1905749256
equaliispec 265475139
floorr 6977812
icopy_ef 41201100
incloop 99480896
incneg 66652
incpos 99075583
int_normalize 302655412
mantissa2nr 137155650
mpz2GEN 57629101
muliispec 5772278182
muliispec_mirror 83862530
muluispec 5444020233
muluui 221724
pari_gmp_free 1742366
pari_gmp_realloc 0
pari_kernel_close 1088
pari_kernel_init 1096
pari_kernel_version 4
red_montgomery 36635852
remi2n 36204004
resetloop 174328
roundr_up_ip 521380215
setloop 2997446
shiftispec 704851737
sqrispec 986034482
sqrispec_mirror 41374183
sqrtr_abs 125118123
sqrtremi 5111104
subiispec 2942692956
subiuspec 1719657263
truncr 3541937
umodiu 1292269309
xmpn_copy 6873887
xmpn_mirror 582604755
xmpn_mirrorcopy 712181130
xmpn_zero 235761909

Generated by: LCOV version 1.16