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-04-25 08:08:21 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 111119331
absdiviu_rem 109977175
addiispec 3103819579
adduispec 2439110688
adduispec_offset 574052039
addumului 0
affir 389870062
cmpiispec 3544355243
convi 423655
diviiexact 494205580
divis 958771
divis_rem 83521457
diviuexact 30310145
diviuexact_i 375246126
diviuuexact 199504
divri 139061342
divri_with_gmp 34824133
divrr 136575535
divrr_with_gmp 73384824
dvmdii 1765585393
equaliispec 260777688
floorr 6966331
icopy_ef 44177422
incloop 101319839
incneg 66652
incpos 100912120
int_normalize 292259964
mantissa2nr 132984621
mpz2GEN 55561031
muliispec 5284857931
muliispec_mirror 82414303
muluispec 5025628132
muluui 221724
pari_gmp_free 1739270
pari_gmp_realloc 0
pari_kernel_close 1064
pari_kernel_init 1072
pari_kernel_version 4
red_montgomery 37386330
remi2n 36420959
resetloop 174328
roundr_up_ip 516664957
setloop 2996871
shiftispec 691623049
sqrispec 977225003
sqrispec_mirror 32824491
sqrtr_abs 119897805
sqrtremi 5096953
subiispec 2793586616
subiuspec 1587969008
truncr 3513823
umodiu 1182450563
xmpn_copy 7125898
xmpn_mirror 559912037
xmpn_mirrorcopy 686591561
xmpn_zero 227866400

Generated by: LCOV version 1.14