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 29419-8afb0ed749) Lines: 2213 2338 94.7 %
Date: 2024-07-02 09:03:41 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 2054
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 12801
fill 13116
nfcompositum 13341
minval 15728
zk_to_Fq_init 18711
rnfeltid_powmod 21902
compositum_fix 26458
ideal_is1 27893
nf_pV_to_prV 38528
indexpartial 44043
redelt 48462
testc2 48462
ZX_rescale_inv 59766
nfXQ_mul 62376
nfX_rem 62376
redelt_i 63908
nfdisc 66429
testb2 66798
nfX_mul 66863
_sqr 71272
ZpX_sylvester_echelon 72974
lift_to_zk 91217
diag_denom 97470
nfmaxord 100698
pol_min 116542
get_modpr 137746
get_powers 157954
nfV_to_FqV 167403
zkmodprinit 174935
ZpX_disc_val 182397
init_norm 212361
get_LV 212383
pradical 212384
primedec_end 212385
fnz 215797
loop 237130
Zlx_gcd 244713
ZpX_gcd 252893
Decomp 252896
update_phi 275450
RgX_nffix 279545
compmod 285592
uniformizer 294190
get_gamma 299566
Fp_basis 305118
ei_msqr_mod 343607
get_g 352624
progress 392512
get_pr 408398
ZpM_hnfmodid 452062
maxord_i 452842
split_char 475671
is_uniformizer 498252
get_norm 498258
QpXV_denom 505215
get_partial_order_as_pols 505221
idealprimedec_limit_norm 505226
getprime 559329
dbasis 617346
vstar 619785
get_nu 635858
nfdiscfactors 644757
diag_denomval 684292
newtoncharpoly 693586
mul_intersect 697815
manage_cache 700228
mycaract 700283
newtonsums 700290
maxord_disc 711184
pow_ei_mod_p 732931
setPE 745403
poldiscfactors_i 788105
set_disc 811830
get_maxord 811882
nfmaxord_check_args 811887
sqr_mod 814379
Rg_nffix 842629
ZpX_reduced_resultant_fast 927994
get_prid 936572
anti_uniformizer 963971
ZpX_reduced_resultant 987572
dim1proj 1029570
modprinit 1157618
idealprimedec 1267588
zx_z_div 1524604
ZX_Dedekind 1530149
maxord 1530150
Flx_radical 1592679
Flx_checkdeflate 1592694
QpX_remove_denom 1731531
idealprimedec_limit_f 2691568
primedec_aux 2698467
QpX_denom 2727354
Fq_to_nf 3235492
ZpX_resultant_val 3438470
ZpX_resultant_val_i 3482701
nf_to_Fq_init 3511857
modpr_TAU 3524826
update_den 3526783
to_ff_init 3530587
idealprimedec_kummer 3789506
mk_pr 4242092
ok_modpr 4362881
init_m 4366392
Zlx_sylvester_echelon 4650236
zk_to_Fq 7113625
nf_to_Fq 15173564
Rg_to_ff 15174064
checkprid 17971152
checkprid_i 22854015

Generated by: LCOV version 1.16