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 - FpX_factor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 1308 1426 91.7 %
Date: 2026-02-23 02:23:56 Functions: 114 124 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
F2x_Berlekamp_i 29851
F2x_Berlekamp_ker 19725
F2x_Cantor_i 255530
F2x_ddf 6
F2x_ddf_simple 299098
F2x_ddf_to_ddf2 6
F2x_degfact 0
F2x_degfact_2 16797
F2x_edf_simple 28321
F2x_factor 12690
F2x_factor_2 1014218
F2x_factor_Cantor 255530
F2x_factor_Shoup 299092
F2x_factor_deg2 1031027
F2x_factor_i 1316408
F2x_factor_squarefree 285369
F2x_is_irred 204
F2x_is_irred_2 12
F2x_quad_factortype 403006
F2x_split_Berlekamp 30179
F2xq_frobtrace 19383
FE_concat 1603172
Fl_disc_bc 23552533
Flx_Xn1 1790
Flx_Xnm1 1877
Flx_cubic_root 344516
Flx_ddf 0
Flx_ddf_Shoup 7854944
Flx_ddf_pre 0
Flx_degfact 6709940
Flx_degfact_2 2148717
Flx_edf 622938
Flx_edf_rec 1163611
Flx_edf_simple 344819
Flx_factor 598456
Flx_factor_2 1731492
Flx_factor_Cantor 1346855
Flx_factor_Shoup 1408579
Flx_factor_deg2 3880257
Flx_factor_i 9855900
Flx_factor_squarefree 297007
Flx_factor_squarefree_pre 6208406
Flx_is_irred 906
Flx_is_irred_2 48
Flx_is_totally_split 69732
Flx_is_totally_split_i 69726
Flx_isirred_Cantor 924
Flx_ispower 2483
Flx_nbfact 570286
Flx_nbfact_Frobenius 0
Flx_nbfact_Frobenius_pre 570286
Flx_nbfact_by_degree 1242539
Flx_nbfact_pre 570286
Flx_nbroots 3617804
Flx_oneroot 1995
Flx_oneroot_mod_2 84
Flx_oneroot_pre 3375274
Flx_oneroot_pre_i 3406665
Flx_oneroot_split 10
Flx_oneroot_split_pre 31391
Flx_otherroot 12654461
Flx_quad_factortype 2126445
Flx_quad_root 21426088
Flx_root_mod_2 80177
Flx_roots 1157
Flx_roots_pre 20541351
Flx_simplefact_Cantor 4562061
FpX_cubic_root 102
FpX_ddf 6
FpX_ddf_Shoup 890
FpX_ddf_degree 3648
FpX_ddf_i 0
FpX_degfact 38412
FpX_degfact_2 12
FpX_edf 377
FpX_edf_rec 920
FpX_edf_simple 0
FpX_factor 3747888
FpX_factor_2 1270
FpX_factor_Cantor 787
FpX_factor_Shoup 878
FpX_factor_Yun 1533
FpX_factor_deg2 1288
FpX_factor_i 2087
FpX_factor_squarefree 297705
FpX_is_irred 96
FpX_is_irred_2 6
FpX_is_totally_split 0
FpX_isirred_Cantor 0
FpX_ispower 144
FpX_nbfact 0
FpX_nbfact_Frobenius 0
FpX_nbroots 131965
FpX_oneroot 200627
FpX_oneroot_i 4582
FpX_oneroot_split 894
FpX_otherroot 8824
FpX_quad_factortype 18
FpX_quad_root 12840
FpX_roots 364495
FpX_roots_i 7228
FpX_roots_mult 194121
FpX_simplefact_Cantor 12
FpX_split_part 208275
ZX_factmod_init 3786402
ZX_rootmod_init 565122
all_roots_mod_p 512
cmpGuGu 13866752
ddf_to_ddf2 6
ddf_to_ddf2_i 12
ddf_to_nbfact 1980260
good_root_of_unity 90
prime_fact 51
split_Flx_cut_out_roots 3625946
split_add 3926642
split_add_done 404549
split_done 368903
split_init 3633174
split_moveto_done 3926630
split_nonsquares 26660
split_squares 26660
split_todo 330790
trivial_fact 290867
vddf_to_simplefact 4562181

Generated by: LCOV version 1.16