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 - base2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 2204 2329 94.6 %
Date: 2024-12-22 09:08:28 Functions: 170 174 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253231
Flx_checkdeflate 1594888
Flx_radical 1594861
FpX_radical 5528
Fp_basis 306572
FqM_to_nfM 10610
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 12669
Fq_to_nf 3239280
QXQV_to_FpM 203
QpXV_denom 505889
QpX_denom 2727642
QpX_remove_denom 1730887
RgV_nffix 49
RgX_nffix 303838
RgX_to_algX 1638
Rg_nffix 906825
ZX_Dedekind 1532399
ZX_rescale_inv 59842
Z_fac 183
Zlx_gcd 245047
Zlx_sylvester_echelon 4658168
ZpM_hnfmodid 451973
ZpX_disc_val 182434
ZpX_gcd 253230
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 987302
ZpX_reduced_resultant_fast 927589
ZpX_resultant_val 3446347
ZpX_resultant_val_i 3490539
ZpX_round4 770
ZpX_sylvester_echelon 72944
_msqr 11557
_sqr 71293
checkmodpr 210
checkprid 17934343
checkprid_i 22904192
compmod 285271
compositum 91
compositum2 2877
compositum_fix 26522
dbasis 618099
diag_denom 98090
diag_denomval 685708
dim1proj 1030728
ei_msqr_mod 347320
errprime 0
expo_is_squarefree 812
fact_from_factors 3619
ffdegree 4109
fill 13368
fix_PE 477
fnz 216765
gc_nf_to_Fq 15206886
gen_if_principal 35
get_LV 214322
get_coprimes 273
get_d 2653
get_g 353043
get_gamma 299977
get_maxord 812525
get_modpr 137746
get_module 63
get_norm 501713
get_nu 636195
get_partial_order_as_pols 505886
get_powers 158745
get_pr 411132
get_prid 939099
getprime 559028
ideal_is1 28355
idealprimedec 1273503
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3801265
idealprimedec_limit_f 2701396
idealprimedec_limit_norm 505216
indexpartial 44106
init_m 4373864
init_norm 214290
is_uniformizer 501705
lift_to_zk 91671
loop 237146
manage_cache 700218
maxord 1532400
maxord_disc 711229
maxord_i 452739
minval 15966
mk_pr 4257154
modpr_TAU 3526293
modpr_genFq 4403
modprinit 1158892
mul_intersect 700838
mycaract 700274
newtoncharpoly 693536
newtonsums 700288
nfM_to_FqM 5809
nfV_to_FqV 167403
nfXQ_mul 62922
nfX_mul 67794
nfX_rem 62922
nfX_sub 4872
nfX_to_FqX 10864
nfX_to_monic 1652
nf_pV_to_prV 38563
nf_pV_to_prVV 26572
nf_to_Fq 12634101
nf_to_Fq_i 15207395
nf_to_Fq_init 3513367
nfbasis 938
nfcompositum 13375
nfcompositum_lambda 497
nfdisc 66465
nfdiscfactors 644765
nfidealdet1 63
nfmaxord 101294
nfmaxord_check_args 812525
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4364548
p_is_prime 2154
pol_min 117121
polcompositum0 12835
poldiscfactors 42
poldiscfactors_i 788570
pow_ei_mod_p 737263
pr_anti_uniformizer 967483
pr_factorback 4361
pr_factorback_scal 4361
pradical 214320
primedec_aux 2708303
primedec_end 214323
progress 392200
redelt 48129
redelt_i 63654
rnfallbase 2597
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4907
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 22203
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2316
rnfjoinmodules_i 6684
rnfmaxord 4823
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12355
setPE 746019
set_disc 812478
split_char 475900
sqr_mod 821267
testb2 66779
testc2 48129
to_ff_init 3532122
triv_order 1296
uniformizer 296119
update_den 3530042
update_fact 2153
update_phi 275206
vstar 619578
zk_to_Fq 7126725
zk_to_Fq_init 18739
zkmodprinit 175425
zx_z_div 1526828

Generated by: LCOV version 1.16