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.1 lcov report (development 29950-285c5b69ed) Lines: 1467 1530 95.9 %
Date: 2025-02-05 09:09:51 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 3750
ZX_graeffe 5369
fft2 7462
roots 8018
ZX_deg1root 15191
_sqrtnr 22635
polrootsbound_i 27216
polrootsbound 27223
RgX_normalize1 35810
ZX_realroots_irred 48226
realroots 50613
ZX_sturm_irred 116104
ZX_sturm_i 119854
polsolve 165503
splitcauchy 165506
split_pols 165507
solve_exact_pol 231040
cleanroots 231644
isexactpol 239634
roots_com 239634
roots_aux 239662
checkvalidpol 266864
QX_complex_roots 289419
_gen_zero 322518
fix_roots1 393875
conformal_mapping 467557
split_1 467557
split_0_1 467880
split_0_2 467880
logradius 493347
update_radius 493353
split_2 493355
parameters 493357
split_fromU 493357
optimize_split 493358
split_0 493677
refine_F 501700
dft 501703
all_roots 529010
clean_roots 529057
fix_roots 530056
a_posteriori_errors 530060
mygprec_special 530062
logpre_modulus 605671
logmodulus 605677
abs_update_r 777904
ZX_sturmpart 875298
ind_maxlog2 901929
check_ab 925911
isexactscalar 931280
usp 940812
isreal 960912
initdft 995061
dual_modulus 1011242
ZX_Uspensky 1057672
fujiwara_bound_real 1147711
tocomplex 1198547
isvalidcoeff 1227428
conformal_basecase 1402787
conformal_pol 1402906
split_complete 1517404
append_clone 1600969
homothetie 1607785
logmin_modulus 1613391
checkbound 1848950
root_error 1895780
ZX_rescale2prim 1948056
fujiwara_bound 2003611
mygprecrc_special 2158394
cmp_complex_appr 2224642
refine_H 2457808
scalepol 4285314
mygprec_absolute 4292105
_mp_mul 4359520
logmax_modulus 4446627
splitpoleval 5190144
bkeval_single_power 5190866
X2XP1 5229906
newton_polygon 5497353
_mp_sqr 6270846
quicktofp 6445008
dblexp 6541414
RgX_gtofp_bit 7012902
abs_update 7991517
mydbllogr 9531345
homothetie2n 9943507
_gen_nored 11112116
eval_rel_pol 13118993
fft 14124753
_gen_one 14358515
ZX_to_ZiX 16406715
pol_to_gaussint 17565619
_mp_add 24568928
_mp_cmul 34583246
myshiftrc 35458958
homothetie_gauss 36467731
lower_bound 40918979
findpower 40919960
graeffe 49455808
mydbllog2r 55849446
mygprec 63606820
ZiX_sqr 98938811
myshiftic 135653986
mygprecrc 214544959
mydbllog2i 224058962
dbllog2 299841238

Generated by: LCOV version 1.16