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-21 09:08:57 Functions: 170 174 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FqV_to_nfV 0
ZpX_primedec 0
errprime 0
rnfsimplifybasis 0
nfmodprinit 7
rnfhnfbasis 7
rnfisfree 7
rnfdet 14
FqX_non_root 21
rnfbasis 21
rnfsteinitz 28
gen_if_principal 35
poldiscfactors 42
RgV_nffix 49
get_module 63
nfidealdet1 63
nfmodprinit0 77
nfmodprlift 77
rnfdiscf 77
compositum 91
rnfdedekind 91
Z_fac 183
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 273
nfmodpr 350
idealprimedec_degrees 371
fix_PE 477
ZpX_monic_factor 490
nfcompositum_lambda 497
ZpX_round4 770
expo_is_squarefree 812
rnfdisc_factored 854
nfbasis 938
ZpX_monic_factor_squarefree 1071
triv_order 1296
RgX_to_algX 1638
nfX_to_monic 1652
p_is_prime 2154
update_fact 2154
rnfjoinmodules 2316
rnfallbase 2597
get_d 2653
compositum2 2877
fact_from_factors 3619
ffdegree 4109
pr_factorback 4361
pr_factorback_scal 4361
modpr_genFq 4403
rnfmaxord 4823
nfX_sub 4872
rnfdedekind_i 4907
FpX_radical 5528
nfM_to_FqM 5809
idealprimedec_galois 6552
rnfjoinmodules_i 6684
FqM_to_nfM 10610
nfX_to_FqX 10864
_msqr 11557
safe_Z_pvalrem 12355
FqX_to_nfX 12669
polcompositum0 12831
fill 13368
nfcompositum 13370
minval 15966
zk_to_Fq_init 18739
rnfeltid_powmod 22203
compositum_fix 26514
nf_pV_to_prVV 26572
ideal_is1 28355
nf_pV_to_prV 38562
indexpartial 44108
redelt 48121
testc2 48121
ZX_rescale_inv 59839
nfXQ_mul 62922
nfX_rem 62922
redelt_i 63650
nfdisc 66463
testb2 66785
nfX_mul 67794
_sqr 71293
ZpX_sylvester_echelon 72941
lift_to_zk 91671
diag_denom 98083
nfmaxord 101297
pol_min 117118
get_modpr 137746
get_powers 158742
nfV_to_FqV 167403
zkmodprinit 175425
ZpX_disc_val 182428
init_norm 214292
pradical 214314
get_LV 214323
primedec_end 214323
fnz 216741
loop 237143
Zlx_gcd 245051
ZpX_gcd 253228
Decomp 253230
update_phi 275215
compmod 285263
uniformizer 296112
get_gamma 299981
RgX_nffix 303844
Fp_basis 306572
ei_msqr_mod 347318
get_g 353045
progress 392183
get_pr 411124
ZpM_hnfmodid 451967
maxord_i 452743
split_char 475881
is_uniformizer 501691
get_norm 501697
idealprimedec_limit_norm 505222
QpXV_denom 505876
get_partial_order_as_pols 505885
getprime 559007
dbasis 618091
vstar 619560
get_nu 636187
nfdiscfactors 644758
diag_denomval 685694
newtoncharpoly 693523
manage_cache 700233
mycaract 700273
newtonsums 700282
mul_intersect 700837
maxord_disc 711214
pow_ei_mod_p 737248
setPE 746017
poldiscfactors_i 788555
set_disc 812466
get_maxord 812509
nfmaxord_check_args 812511
sqr_mod 821263
Rg_nffix 906845
ZpX_reduced_resultant_fast 927603
get_prid 939099
pr_anti_uniformizer 967482
ZpX_reduced_resultant 987284
dim1proj 1030717
modprinit 1158898
idealprimedec 1273470
zx_z_div 1526807
ZX_Dedekind 1532386
maxord 1532386
Flx_radical 1594830
Flx_checkdeflate 1594835
QpX_remove_denom 1730861
idealprimedec_limit_f 2701358
primedec_aux 2708274
QpX_denom 2727600
Fq_to_nf 3239277
ZpX_resultant_val 3446325
ZpX_resultant_val_i 3490494
nf_to_Fq_init 3513350
modpr_TAU 3526293
update_den 3530040
to_ff_init 3532101
idealprimedec_kummer 3801191
mk_pr 4257140
ok_modpr 4364526
init_m 4373844
Zlx_sylvester_echelon 4658105
zk_to_Fq 7126700
nf_to_Fq 12634125
gc_nf_to_Fq 15206907
nf_to_Fq_i 15207430
checkprid 17934517
checkprid_i 22904408

Generated by: LCOV version 1.16