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 29873-a0b27995a4) Lines: 2231 2372 94.1 %
Date: 2025-01-14 09:09:31 Functions: 174 178 97.8 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 254721
Flx_checkdeflate 1599623
Flx_radical 1599613
FpX_radical 5685
Fp_basis 307405
FqM_to_nfM 2826
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 9498
Fq_to_nf 3083507
QXQV_to_FpM 203
QpXV_denom 508874
QpX_denom 2748911
QpX_remove_denom 1740990
RgV_nffix 49
RgX_nffix 309175
RgX_to_algX 1638
Rg_nffix 919869
ZX_Dedekind 1537013
ZX_rescale_inv 59878
Z_fac 183
Zlx_gcd 246113
Zlx_sylvester_echelon 4669095
ZpM_hnfmodid 454015
ZpX_disc_val 184155
ZpX_gcd 254725
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 992589
ZpX_reduced_resultant_fast 931347
ZpX_resultant_val 3450354
ZpX_resultant_val_i 3495697
ZpX_round4 770
ZpX_sylvester_echelon 73965
_msqr 4130
_sqr 16105
checkmodpr 210
checkprid 17911601
checkprid_i 22880944
compmod 286757
compositum 91
compositum2 2884
compositum_fix 26535
dbasis 619613
diag_denom 99480
diag_denomval 685744
dim1proj 1030135
ei_msqr_mod 347662
errprime 0
expo_is_squarefree 812
fact_from_factors 4011
ffdegree 4109
fill 4044
fix_PE 498
fnz 221370
gc_nf_to_Fq 13899016
gen_if_principal 35
get_LV 214614
get_coprimes 294
get_d 2751
get_g 355803
get_gamma 302735
get_maxord 812953
get_modpr 137746
get_module 63
get_norm 503360
get_nu 640283
get_partial_order_as_pols 508877
get_powers 159461
get_pr 411992
get_prid 939106
getprime 562571
ideal_is1 7880
idealprimedec 1273348
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3799886
idealprimedec_limit_f 2700868
idealprimedec_limit_norm 505219
indexpartial 44115
init_m 4381635
init_norm 214584
is_uniformizer 503351
lift_to_zk 91953
loop 238304
manage_cache 704970
maxord 1537016
maxord_disc 711226
maxord_i 454785
minval 3688
mk_pr 4257483
modpr_TAU 3512949
modpr_genFq 4438
modprinit 1158201
mul_intersect 702818
mycaract 705015
newtoncharpoly 698227
newtonsums 705020
nfM_to_FqM 1798
nfV_to_FqV 167403
nfXQ_mul 16407
nfX_mul 20236
nfX_rem 16407
nfX_sub 3829
nfX_to_FqX 8771
nfX_to_monic 1652
nfXisintegral 6545
nf_pV_to_prV 38605
nf_pV_to_prVV 26614
nf_to_Fq 12638724
nf_to_Fq_i 13899532
nf_to_Fq_init 3511714
nfbasis 938
nfcompositum 13379
nfcompositum_lambda 504
nfdisc 66465
nfdiscfactors 644769
nfidealdet1 63
nfisintegral 28504
nfmaxord 101722
nfmaxord_check_args 812957
nfmodpr 350
nfmodprinit 7
nfmodprinit0 77
nfmodprlift 77
nfpolisintegral 7875
nfpolisintegral_i 7875
nfreducemodpr 210
ok_modpr 4362914
p_is_prime 2240
pol_min 117695
polcompositum0 12833
poldiscfactors 42
poldiscfactors_i 788576
pow_ei_mod_p 738847
pr_anti_uniformizer 966750
pr_factorback 3815
pr_factorback_scal 3815
pradical 214610
primedec_aux 2707775
primedec_end 214614
progress 393818
redelt 48456
redelt_i 64234
rnfallbase 2702
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 3857
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 5739
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 1231
rnfjoinmodules_i 2022
rnfmaxord 3773
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 13986
setPE 746436
set_disc 812911
split_char 479631
sqr_mod 822468
testb2 67117
testc2 48456
to_ff_init 3530476
triv_order 1345
uniformizer 296986
update_den 3564995
update_fact 2351
update_phi 276228
vstar 623186
zk_to_Fq 6394566
zk_to_Fq_init 18746
zkmodprinit 175446
zx_z_div 1531275

Generated by: LCOV version 1.16