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 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.10.0 lcov report (development 21741-70cf009) Lines: 647 716 90.4 %
Date: 2018-01-21 06:18:30 Functions: 53 54 98.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
GEN2mpz 272908642
addiispec 1587675998
adduispec 1149021252
adduispec_offset 249181397
addumului 773627
affir 118146626
cmpiispec 1917422052
convi 532271
diviiexact 270871763
divis 392134
divis_rem 85201115
diviu_rem 124698684
diviuexact 288459367
diviuuexact 528989
divri 18629297
divri_with_gmp 3312943
divrr 89042749
divrr_with_gmp 34762087
dvmdii 833311092
equaliispec 110055613
floorr 469137
icopy_ef 13108327
incloop 33257978
incneg 6268
incpos 33220820
int_normalize 89117155
mantissa2nr 25093025
mpz2GEN 261507380
muliispec 2195382326
muliispec_mirror 61835719
muluispec 2311460193
muluui 551197
pari_gmp_free 303546
pari_gmp_realloc 0
pari_kernel_close 872
pari_kernel_init 872
red_montgomery 10810832
remi2n 15451305
resetloop 170652
roundr_up_ip 302213275
setloop 2495714
shiftispec 382169281
sqrispec 734071451
sqrispec_mirror 5318500
sqrtr_abs 23354050
sqrtremi 3486036
subiispec 1537054211
subiuspec 826371390
truncr 1642759
umodiu 894723732
xmpn_copy 1646731
xmpn_mirror 195659934
xmpn_mirrorcopy 284168889
xmpn_zero 61429080

Generated by: LCOV version 1.11