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.0 lcov report (development 29712-7c8a932571) Lines: 683 719 95.0 %
Date: 2024-11-15 09:08:45 Functions: 54 56 96.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 114816497
absdiviu_rem 111061339
addiispec 3255942127
adduispec 2579118256
adduispec_offset 580702061
addumului 0
affir 399694298
cmpiispec 3816092491
convi 436578
diviiexact 495799453
divis 968390
divis_rem 85137906
diviuexact 31132957
diviuexact_i 379173547
diviuuexact 199459
divri 150108476
divri_with_gmp 35159239
divrr 141334921
divrr_with_gmp 75538838
dvmdii 1906087603
equaliispec 272728078
floorr 6979807
icopy_ef 40943020
incloop 99284033
incneg 66652
incpos 98878835
int_normalize 302980427
mantissa2nr 136975092
mpz2GEN 57409677
muliispec 5765046644
muliispec_mirror 83612523
muluispec 5431906501
muluui 221678
pari_gmp_free 1735631
pari_gmp_realloc 0
pari_kernel_close 1080
pari_kernel_init 1088
pari_kernel_version 4
red_montgomery 36697338
remi2n 36053563
resetloop 174328
roundr_up_ip 519933416
setloop 2997416
shiftispec 699107283
sqrispec 987582431
sqrispec_mirror 41356015
sqrtr_abs 124940749
sqrtremi 5113123
subiispec 2943886298
subiuspec 1718825161
truncr 3547949
umodiu 1286738803
xmpn_copy 6870591
xmpn_mirror 581812796
xmpn_mirrorcopy 710964349
xmpn_zero 235407136

Generated by: LCOV version 1.16