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 29451-c474da952c) Lines: 683 719 95.0 %
Date: 2024-07-16 09:03:37 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 109827390
absdiviu_rem 109519933
addiispec 3156749141
adduispec 2510835325
adduispec_offset 575510440
addumului 0
affir 396861252
cmpiispec 3716991569
convi 427414
diviiexact 472018784
divis 965809
divis_rem 83909680
diviuexact 30744484
diviuexact_i 370374903
diviuuexact 199486
divri 150756372
divri_with_gmp 35070269
divrr 140167424
divrr_with_gmp 74638991
dvmdii 1888456553
equaliispec 269938144
floorr 6947231
icopy_ef 40504197
incloop 99599559
incneg 66652
incpos 99190854
int_normalize 292061519
mantissa2nr 137150009
mpz2GEN 54915018
muliispec 5659053867
muliispec_mirror 84019764
muluispec 5319259604
muluui 221699
pari_gmp_free 1733455
pari_gmp_realloc 0
pari_kernel_close 1076
pari_kernel_init 1084
pari_kernel_version 4
red_montgomery 37317235
remi2n 36310515
resetloop 174328
roundr_up_ip 520750647
setloop 2996970
shiftispec 690089198
sqrispec 986319015
sqrispec_mirror 41334191
sqrtr_abs 124949766
sqrtremi 5100179
subiispec 2860812688
subiuspec 1659524806
truncr 3479449
umodiu 1189378489
xmpn_copy 6679741
xmpn_mirror 579784152
xmpn_mirrorcopy 709175976
xmpn_zero 234413987

Generated by: LCOV version 1.16