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-23 08:07:35 Functions: 116 119 97.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
_intervalcmp 0
_mp_sub 0
scalepol2n 0
ZX_Uspensky_equal_yes 14
polgraeffe 14
ZX_Uspensky_no 21
ZX_Uspensky_equal 28
rootsdeg0 42
FFT 56
FFTinv 56
polmod_to_embed 84
FFT_i 98
ZX_sturm 1414
ZX_sturmpart 3074
sol_ok 3399
ZX_graeffe 5306
fft2 7462
roots 7913
ZX_deg1root 14443
_sqrtnr 22216
polrootsbound_i 26978
polrootsbound 26985
RgX_normalize1 35234
ZX_realroots_irred 47412
realroots 50536
check_ab 53610
checkbound 105596
ZX_sturm_irred 114677
ZX_sturm_i 116091
split_pols 164787
polsolve 164800
splitcauchy 164800
ZX_Uspensky 182109
solve_exact_pol 212597
cleanroots 212968
isexactpol 220853
roots_com 220853
roots_aux 220881
usp 229446
checkvalidpol 247845
fujiwara_bound_real 269191
QX_complex_roots 289029
_gen_zero 321021
fix_roots1 375323
ZX_rescale2prim 415692
conformal_mapping 445718
split_1 445718
split_0_1 446037
split_0_2 446038
logradius 470685
parameters 470688
split_2 470689
update_radius 470689
optimize_split 470692
split_fromU 470692
split_0 471015
refine_F 478683
dft 478687
all_roots 509838
clean_roots 509878
fix_roots 510647
a_posteriori_errors 510649
mygprec_special 510652
logpre_modulus 581017
logmodulus 581020
abs_update_r 736070
isexactscalar 858319
ind_maxlog2 858550
isreal 916408
initdft 949378
dual_modulus 965419
fujiwara_bound 1097584
isvalidcoeff 1148238
tocomplex 1174074
X2XP1 1276931
conformal_basecase 1337267
conformal_pol 1337385
split_complete 1452669
append_clone 1536733
homothetie 1537512
logmin_modulus 1541440
root_error 1828503
mygprecrc_special 2072188
cmp_complex_appr 2152077
refine_H 2355065
quicktofp 4052129
scalepol 4086277
mygprec_absolute 4173722
logmax_modulus 4251323
_mp_mul 4316917
splitpoleval 5166727
bkeval_single_power 5167038
newton_polygon 5274993
_mp_sqr 6228297
dblexp 6259920
RgX_gtofp_bit 6737910
abs_update 7726202
mydbllogr 9198368
homothetie2n 9525983
_gen_nored 11047071
eval_rel_pol 12577452
fft 13731678
_gen_one 14287651
ZX_to_ZiX 16184895
pol_to_gaussint 16828844
_mp_add 24370518
myshiftrc 34081659
_mp_cmul 34335666
homothetie_gauss 34872886
findpower 39131661
lower_bound 39131966
graeffe 47326139
mydbllog2r 52747349
mygprec 61047566
ZiX_sqr 94674166
myshiftic 130487555
mygprecrc 207528189
mydbllog2i 215836693
dbllog2 290594104

Generated by: LCOV version 1.14