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 - basemath - rootpol.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29115-f22e516b23) Lines: 1480 1543 95.9 %
Date: 2024-04-25 08:08:21 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FFT 56
FFT_i 98
FFTinv 56
QX_complex_roots 289032
RgX_gtofp_bit 6738056
RgX_normalize1 35234
X2XP1 1276948
ZX_Uspensky 182107
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 14442
ZX_graeffe 5306
ZX_realroots_irred 47412
ZX_rescale2prim 415700
ZX_sturm 1414
ZX_sturm_i 116087
ZX_sturm_irred 114673
ZX_sturmpart 3074
ZX_to_ZiX 16188050
ZiX_sqr 94673848
_gen_nored 11047285
_gen_one 14288017
_gen_zero 321027
_intervalcmp 0
_mp_add 24369877
_mp_cmul 34335181
_mp_mul 4316882
_mp_sqr 6228231
_mp_sub 0
_sqrtnr 22215
a_posteriori_errors 510647
abs_update 7726913
abs_update_r 736061
all_roots 509842
append_clone 1536747
bkeval_single_power 5167156
check_ab 53610
checkbound 105596
checkvalidpol 247845
clean_roots 509887
cleanroots 212968
cmp_complex_appr 2152114
conformal_basecase 1337317
conformal_mapping 445733
conformal_pol 1337436
dblexp 6260195
dbllog2 290601630
dft 478704
dual_modulus 965467
eval_rel_pol 12577939
fft 13732221
fft2 7462
findpower 39133619
fix_roots 510649
fix_roots1 375327
fujiwara_bound 1097581
fujiwara_bound_real 269190
graeffe 47326958
homothetie 1537563
homothetie2n 9526242
homothetie_gauss 34873811
ind_maxlog2 858598
initdft 949413
isexactpol 220853
isexactscalar 858319
isreal 916441
isvalidcoeff 1148238
logmax_modulus 4251508
logmin_modulus 1541508
logmodulus 581032
logpre_modulus 581034
logradius 470708
lower_bound 39133218
mydbllog2i 215839939
mydbllog2r 52749133
mydbllogr 9199043
mygprec 61049689
mygprec_absolute 4173747
mygprec_special 510656
mygprecrc 207543193
mygprecrc_special 2072213
myshiftic 130488706
myshiftrc 34082423
newton_polygon 5275093
optimize_split 470709
parameters 470710
pol_to_gaussint 16829574
polgraeffe 14
polmod_to_embed 84
polrootsbound 26985
polrootsbound_i 26978
polsolve 164791
quicktofp 4052128
realroots 50536
refine_F 478702
refine_H 2355154
root_error 1828519
roots 7913
roots_aux 220881
roots_com 220853
rootsdeg0 42
scalepol 4086425
scalepol2n 0
sol_ok 3399
solve_exact_pol 212597
split_0 471031
split_0_1 446057
split_0_2 446057
split_1 445734
split_2 470708
split_complete 1452708
split_fromU 470709
split_pols 164788
splitcauchy 164795
splitpoleval 5166976
tocomplex 1174108
update_radius 470705
usp 229459

Generated by: LCOV version 1.14