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.18.0 lcov report (development 29712-7c8a932571) Lines: 1480 1543 95.9 %
Date: 2024-11-15 09:08:45 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
sol_ok 3350
ZX_sturm 3736
ZX_graeffe 5369
fft2 7462
roots 8018
ZX_deg1root 15127
_sqrtnr 22592
polrootsbound_i 27196
polrootsbound 27203
RgX_normalize1 35452
ZX_realroots_irred 48114
realroots 50613
ZX_sturm_irred 115936
ZX_sturm_i 119672
polsolve 165279
split_pols 165286
splitcauchy 165294
solve_exact_pol 231047
cleanroots 231313
isexactpol 239303
roots_com 239303
roots_aux 239331
checkvalidpol 266513
QX_complex_roots 289179
_gen_zero 322106
fix_roots1 393230
split_1 466831
conformal_mapping 466833
split_0_1 467155
split_0_2 467156
logradius 492683
update_radius 492683
parameters 492684
optimize_split 492686
split_2 492686
split_fromU 492686
split_0 493009
dft 500924
refine_F 500924
all_roots 528437
clean_roots 528480
a_posteriori_errors 529216
fix_roots 529222
mygprec_special 529223
logmodulus 604826
logpre_modulus 604829
abs_update_r 776222
ZX_sturmpart 875207
ind_maxlog2 900868
check_ab 925820
isexactscalar 930970
usp 939141
isreal 959517
initdft 993609
dual_modulus 1009961
ZX_Uspensky 1057392
fujiwara_bound_real 1147315
tocomplex 1196972
isvalidcoeff 1224452
conformal_basecase 1400611
conformal_pol 1400731
split_complete 1515230
append_clone 1598469
homothetie 1605662
logmin_modulus 1611358
checkbound 1848770
root_error 1892865
ZX_rescale2prim 1934913
fujiwara_bound 2002310
mygprecrc_special 2152493
cmp_complex_appr 2222606
refine_H 2452246
scalepol 4278943
mygprec_absolute 4284615
_mp_mul 4353924
logmax_modulus 4440930
splitpoleval 5183924
bkeval_single_power 5184024
X2XP1 5201737
newton_polygon 5489440
_mp_sqr 6264745
quicktofp 6438782
dblexp 6532378
RgX_gtofp_bit 7003226
abs_update 7988857
mydbllogr 9526435
homothetie2n 9929968
_gen_nored 11095191
eval_rel_pol 13102759
fft 14115076
_gen_one 14339597
ZX_to_ZiX 16458491
pol_to_gaussint 17543661
_mp_add 24544678
_mp_cmul 34541422
myshiftrc 35406737
homothetie_gauss 36416784
lower_bound 40865312
findpower 40866257
graeffe 49391513
mydbllog2r 55739658
mygprec 63487366
ZiX_sqr 98803374
myshiftic 135476959
mygprecrc 214131534
mydbllog2i 223869210
dbllog2 299640305

Generated by: LCOV version 1.16