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-05-01 08:07:45 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 289034
RgX_gtofp_bit 6738077
RgX_normalize1 35233
X2XP1 1276922
ZX_Uspensky 182110
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 14443
ZX_graeffe 5306
ZX_realroots_irred 47413
ZX_rescale2prim 415685
ZX_sturm 1414
ZX_sturm_i 116091
ZX_sturm_irred 114677
ZX_sturmpart 3074
ZX_to_ZiX 16189042
ZiX_sqr 94673439
_gen_nored 11046858
_gen_one 14287573
_gen_zero 321025
_intervalcmp 0
_mp_add 24369390
_mp_cmul 34335666
_mp_mul 4316932
_mp_sqr 6228144
_mp_sub 0
_sqrtnr 22215
a_posteriori_errors 510659
abs_update 7726722
abs_update_r 736055
all_roots 509839
append_clone 1536770
bkeval_single_power 5167033
check_ab 53610
checkbound 105596
checkvalidpol 247845
clean_roots 509891
cleanroots 212968
cmp_complex_appr 2152136
conformal_basecase 1337311
conformal_mapping 445734
conformal_pol 1337433
dblexp 6260176
dbllog2 290601775
dft 478706
dual_modulus 965471
eval_rel_pol 12577892
fft 13732316
fft2 7462
findpower 39133220
fix_roots 510653
fix_roots1 375329
fujiwara_bound 1097586
fujiwara_bound_real 269190
graeffe 47326742
homothetie 1537568
homothetie2n 9526301
homothetie_gauss 34872475
ind_maxlog2 858611
initdft 949414
isexactpol 220853
isexactscalar 858319
isreal 916442
isvalidcoeff 1148234
logmax_modulus 4251495
logmin_modulus 1541496
logmodulus 581043
logpre_modulus 581045
logradius 470705
lower_bound 39132425
mydbllog2i 215836232
mydbllog2r 52749084
mydbllogr 9198840
mygprec 61049943
mygprec_absolute 4173835
mygprec_special 510659
mygprecrc 207544937
mygprecrc_special 2072237
myshiftic 130482222
myshiftrc 34082070
newton_polygon 5275188
optimize_split 470710
parameters 470709
pol_to_gaussint 16829524
polgraeffe 14
polmod_to_embed 84
polrootsbound 26985
polrootsbound_i 26977
polsolve 164786
quicktofp 4052177
realroots 50536
refine_F 478700
refine_H 2355169
root_error 1828560
roots 7913
roots_aux 220881
roots_com 220853
rootsdeg0 42
scalepol 4086435
scalepol2n 0
sol_ok 3399
solve_exact_pol 212597
split_0 471034
split_0_1 446054
split_0_2 446054
split_1 445733
split_2 470709
split_complete 1452715
split_fromU 470710
split_pols 164785
splitcauchy 164802
splitpoleval 5166781
tocomplex 1174121
update_radius 470708
usp 229447

Generated by: LCOV version 1.14