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-19 08:07:28 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 289033
RgX_gtofp_bit 6738024
RgX_normalize1 35234
X2XP1 1276912
ZX_Uspensky 182108
ZX_Uspensky_equal 28
ZX_Uspensky_equal_yes 14
ZX_Uspensky_no 21
ZX_deg1root 14443
ZX_graeffe 5306
ZX_realroots_irred 47414
ZX_rescale2prim 415684
ZX_sturm 1414
ZX_sturm_i 116087
ZX_sturm_irred 114673
ZX_sturmpart 3074
ZX_to_ZiX 16189700
ZiX_sqr 94672173
_gen_nored 11046327
_gen_one 14287240
_gen_zero 321005
_intervalcmp 0
_mp_add 24370171
_mp_cmul 34332478
_mp_mul 4316903
_mp_sqr 6228156
_mp_sub 0
_sqrtnr 22216
a_posteriori_errors 510653
abs_update 7726997
abs_update_r 736076
all_roots 509842
append_clone 1536774
bkeval_single_power 5166784
check_ab 53610
checkbound 105596
checkvalidpol 247845
clean_roots 509884
cleanroots 212968
cmp_complex_appr 2152120
conformal_basecase 1337320
conformal_mapping 445734
conformal_pol 1337439
dblexp 6260240
dbllog2 290601920
dft 478717
dual_modulus 965492
eval_rel_pol 12577941
fft 13732141
fft2 7462
findpower 39133570
fix_roots 510655
fix_roots1 375332
fujiwara_bound 1097582
fujiwara_bound_real 269189
graeffe 47326312
homothetie 1537585
homothetie2n 9526287
homothetie_gauss 34872980
ind_maxlog2 858622
initdft 949436
isexactpol 220853
isexactscalar 858319
isreal 916453
isvalidcoeff 1148238
logmax_modulus 4251564
logmin_modulus 1541533
logmodulus 581042
logpre_modulus 581045
logradius 470717
lower_bound 39132643
mydbllog2i 215836864
mydbllog2r 52749675
mydbllogr 9199148
mygprec 61051337
mygprec_absolute 4173795
mygprec_special 510658
mygprecrc 207550898
mygprecrc_special 2072237
myshiftic 130479291
myshiftrc 34082147
newton_polygon 5275120
optimize_split 470719
parameters 470720
pol_to_gaussint 16829636
polgraeffe 14
polmod_to_embed 84
polrootsbound 26985
polrootsbound_i 26978
polsolve 164780
quicktofp 4052194
realroots 50536
refine_F 478713
refine_H 2355220
root_error 1828546
roots 7913
roots_aux 220881
roots_com 220853
rootsdeg0 42
scalepol 4086464
scalepol2n 0
sol_ok 3399
solve_exact_pol 212597
split_0 471041
split_0_1 446055
split_0_2 446055
split_1 445736
split_2 470718
split_complete 1452737
split_fromU 470718
split_pols 164787
splitcauchy 164797
splitpoleval 5166643
tocomplex 1174101
update_radius 470716
usp 229453

Generated by: LCOV version 1.14