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.16.2 lcov report (development 29115-f22e516b23) Lines: 683 719 95.0 %
Date: 2024-05-03 08:08:58 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 111121144
absdiviu_rem 109979365
addiispec 3103717193
adduispec 2442374394
adduispec_offset 574319129
addumului 0
affir 389931150
cmpiispec 3543907835
convi 423657
diviiexact 494264127
divis 958767
divis_rem 83519799
diviuexact 30310420
diviuexact_i 375281397
diviuuexact 199473
divri 139060867
divri_with_gmp 34823671
divrr 136581332
divrr_with_gmp 73384998
dvmdii 1765786674
equaliispec 260777174
floorr 6965338
icopy_ef 44178069
incloop 100768209
incneg 66652
incpos 100359970
int_normalize 292239664
mantissa2nr 132983684
mpz2GEN 55561729
muliispec 5284376660
muliispec_mirror 82425215
muluispec 5024793899
muluui 221701
pari_gmp_free 1739272
pari_gmp_realloc 0
pari_kernel_close 1064
pari_kernel_init 1072
pari_kernel_version 4
red_montgomery 37383923
remi2n 36393667
resetloop 174328
roundr_up_ip 516670555
setloop 2996869
shiftispec 691590582
sqrispec 977222680
sqrispec_mirror 32825502
sqrtr_abs 119898312
sqrtremi 5097020
subiispec 2793640548
subiuspec 1587966326
truncr 3512401
umodiu 1185681376
xmpn_copy 7125958
xmpn_mirror 559939224
xmpn_mirrorcopy 686657815
xmpn_zero 227862480

Generated by: LCOV version 1.14