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.16.2 lcov report (development 29465-f396510193) Lines: 2213 2338 94.7 %
Date: 2024-07-25 09:03:53 Functions: 168 172 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 70
nfmodprlift 77
rnfdiscf 77
compositum 91
rnfdedekind 91
Z_fac 183
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 273
nfmodpr 329
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
triv_order 1016
ZpX_monic_factor_squarefree 1071
RgX_to_algX 1638
nfX_to_monic 1652
p_is_prime 2055
update_fact 2078
rnfjoinmodules 2218
rnfallbase 2219
get_d 2275
compositum2 2828
fact_from_factors 3584
pr_factorback 3605
pr_factorback_scal 3605
ffdegree 4109
modpr_genFq 4326
rnfmaxord 4438
nfX_sub 4487
rnfdedekind_i 4522
FpX_radical 5502
nfM_to_FqM 5648
idealprimedec_galois 6552
rnfjoinmodules_i 6558
nfX_to_FqX 10094
FqM_to_nfM 10358
_msqr 11473
FqX_to_nfX 11801
safe_Z_pvalrem 12285
polcompositum0 12807
fill 13116
nfcompositum 13346
minval 15728
zk_to_Fq_init 18711
rnfeltid_powmod 21902
compositum_fix 26463
ideal_is1 27893
nf_pV_to_prV 38528
indexpartial 44041
redelt 48459
testc2 48459
ZX_rescale_inv 59760
nfXQ_mul 62376
nfX_rem 62376
redelt_i 63902
nfdisc 66427
testb2 66802
nfX_mul 66863
_sqr 71272
ZpX_sylvester_echelon 72974
lift_to_zk 91217
diag_denom 97473
nfmaxord 100692
pol_min 116532
get_modpr 137746
get_powers 157944
nfV_to_FqV 167403
zkmodprinit 174935
ZpX_disc_val 182405
init_norm 212345
get_LV 212379
primedec_end 212379
pradical 212381
fnz 215797
loop 237133
Zlx_gcd 244726
Decomp 252902
ZpX_gcd 252905
update_phi 275460
RgX_nffix 279546
compmod 285588
uniformizer 294180
get_gamma 299561
Fp_basis 305107
ei_msqr_mod 343591
get_g 352617
progress 392526
get_pr 408396
ZpM_hnfmodid 452079
maxord_i 452840
split_char 475680
is_uniformizer 498252
get_norm 498255
idealprimedec_limit_norm 505220
QpXV_denom 505231
get_partial_order_as_pols 505231
getprime 559335
dbasis 617351
vstar 619780
get_nu 635878
nfdiscfactors 644769
diag_denomval 684305
newtoncharpoly 693628
mul_intersect 697785
manage_cache 700262
mycaract 700299
newtonsums 700300
maxord_disc 711188
pow_ei_mod_p 732918
setPE 745406
poldiscfactors_i 788107
set_disc 811861
get_maxord 811880
nfmaxord_check_args 811880
sqr_mod 814364
Rg_nffix 842630
ZpX_reduced_resultant_fast 928022
get_prid 936572
anti_uniformizer 963964
ZpX_reduced_resultant 987586
dim1proj 1029575
modprinit 1157624
idealprimedec 1267575
zx_z_div 1524642
ZX_Dedekind 1530158
maxord 1530159
Flx_radical 1592722
Flx_checkdeflate 1592740
QpX_remove_denom 1731558
idealprimedec_limit_f 2691554
primedec_aux 2698460
QpX_denom 2727426
Fq_to_nf 3235491
ZpX_resultant_val 3438443
ZpX_resultant_val_i 3482698
nf_to_Fq_init 3511879
modpr_TAU 3524840
update_den 3526912
to_ff_init 3530618
idealprimedec_kummer 3789432
mk_pr 4242047
ok_modpr 4362914
init_m 4366415
Zlx_sylvester_echelon 4650251
zk_to_Fq 7113640
nf_to_Fq 15173573
Rg_to_ff 15174083
checkprid 17971137
checkprid_i 22854004

Generated by: LCOV version 1.16