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.1 lcov report (development 30007-407ab607e8) Lines: 2232 2373 94.1 %
Date: 2025-02-20 09:19:49 Functions: 174 178 97.8 %
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 294
nfmodpr 350
idealprimedec_degrees 371
fix_PE 498
nfcompositum_lambda 511
ZpX_monic_factor 546
rnfdisc_factored 854
expo_is_squarefree 889
ZpX_round4 896
nfbasis 938
ZpX_monic_factor_squarefree 1155
rnfjoinmodules 1287
triv_order 1513
RgX_to_algX 1638
nfX_to_monic 1652
nfM_to_FqM 1865
rnfjoinmodules_i 2083
p_is_prime 2200
update_fact 2364
compositum2 2898
FqM_to_nfM 2920
rnfallbase 2926
get_d 2975
minval 3769
rnfmaxord 3976
nfX_sub 4032
fact_from_factors 4039
rnfdedekind_i 4060
ffdegree 4109
fill 4166
_msqr 4186
pr_factorback 4235
pr_factorback_scal 4235
modpr_genFq 4508
FpX_radical 5700
rnfeltid_powmod 5834
idealprimedec_galois 6552
nfXisintegral 6972
ideal_is1 8042
nfpolisintegral 8092
nfpolisintegral_i 8092
nfX_to_FqX 9177
FqX_to_nfX 9960
polcompositum0 12856
nfcompositum 13410
safe_Z_pvalrem 14021
_sqr 16218
nfXQ_mul 16530
nfX_rem 16530
zk_to_Fq_init 18753
nfX_mul 20562
compositum_fix 26593
nf_pV_to_prVV 26614
nfisintegral 29673
nf_pV_to_prV 38605
indexpartial 44111
redelt 48606
testc2 48606
ZX_rescale_inv 59906
redelt_i 64430
nfdisc 66463
testb2 67407
ZpX_sylvester_echelon 73888
lift_to_zk 92367
diag_denom 99631
nfmaxord 101923
pol_min 117825
get_modpr 137753
get_powers 159798
nfV_to_FqV 167410
zkmodprinit 175460
ZpX_disc_val 184493
init_norm 214924
primedec_end 214945
get_LV 214946
pradical 214948
fnz 221591
loop 238783
Zlx_gcd 246154
Decomp 254650
ZpX_gcd 254652
update_phi 277017
compmod 287387
uniformizer 297405
get_gamma 303905
Fp_basis 307688
RgX_nffix 322572
ei_msqr_mod 348231
get_g 356958
progress 394662
get_pr 412559
ZpM_hnfmodid 454318
maxord_i 455217
split_char 481183
is_uniformizer 504199
get_norm 504206
idealprimedec_limit_norm 505222
QpXV_denom 508706
get_partial_order_as_pols 508706
getprime 564181
dbasis 620296
vstar 624839
get_nu 642184
nfdiscfactors 644772
diag_denomval 685951
newtoncharpoly 700567
mul_intersect 703559
manage_cache 707340
mycaract 707395
newtonsums 707401
maxord_disc 711229
pow_ei_mod_p 740015
setPE 746632
poldiscfactors_i 788735
set_disc 813111
get_maxord 813153
nfmaxord_check_args 813154
sqr_mod 823690
ZpX_reduced_resultant_fast 933038
get_prid 939491
Rg_nffix 944546
pr_anti_uniformizer 966381
ZpX_reduced_resultant 994231
dim1proj 1030081
modprinit 1157848
idealprimedec 1274489
zx_z_div 1531456
ZX_Dedekind 1537179
maxord 1537180
Flx_radical 1599829
Flx_checkdeflate 1599848
QpX_remove_denom 1744902
idealprimedec_limit_f 2702516
primedec_aux 2709421
QpX_denom 2751408
Fq_to_nf 3084789
ZpX_resultant_val 3453098
ZpX_resultant_val_i 3499163
nf_to_Fq_init 3511610
modpr_TAU 3512834
to_ff_init 3530372
update_den 3572280
idealprimedec_kummer 3802151
mk_pr 4260379
ok_modpr 4363011
init_m 4386071
Zlx_sylvester_echelon 4674212
zk_to_Fq 6395173
nf_to_Fq 12637947
gc_nf_to_Fq 13900907
nf_to_Fq_i 13901421
checkprid 17908791
checkprid_i 22881378

Generated by: LCOV version 1.16