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 29420-55f63b8cfe) Lines: 2213 2338 94.7 %
Date: 2024-07-03 09:03:24 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 252903
Flx_checkdeflate 1592740
Flx_radical 1592727
FpX_radical 5502
Fp_basis 305114
FqM_to_nfM 10358
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 11801
Fq_to_nf 3235491
QXQV_to_FpM 203
QpXV_denom 505233
QpX_denom 2727430
QpX_remove_denom 1731558
RgV_nffix 49
RgX_nffix 279545
RgX_to_algX 1638
Rg_nffix 842627
Rg_to_ff 15174040
ZX_Dedekind 1530172
ZX_rescale_inv 59769
Z_fac 183
Zlx_gcd 244722
Zlx_sylvester_echelon 4650241
ZpM_hnfmodid 452080
ZpX_disc_val 182403
ZpX_gcd 252902
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 987579
ZpX_reduced_resultant_fast 927983
ZpX_resultant_val 3438430
ZpX_resultant_val_i 3482682
ZpX_round4 770
ZpX_sylvester_echelon 72974
_msqr 11473
_sqr 71272
anti_uniformizer 963983
checkmodpr 210
checkprid 17970950
checkprid_i 22853754
compmod 285609
compositum 91
compositum2 2828
compositum_fix 26469
dbasis 617351
diag_denom 97477
diag_denomval 684298
dim1proj 1029577
ei_msqr_mod 343600
errprime 0
expo_is_squarefree 812
fact_from_factors 3584
ffdegree 4109
fill 13116
fix_PE 477
fnz 215831
gen_if_principal 35
get_LV 212383
get_coprimes 273
get_d 2275
get_g 352631
get_gamma 299569
get_maxord 811895
get_modpr 137746
get_module 63
get_norm 498245
get_nu 635854
get_partial_order_as_pols 505238
get_powers 157948
get_pr 408397
get_prid 936572
getprime 559323
ideal_is1 27893
idealprimedec 1267556
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3789475
idealprimedec_limit_f 2691561
idealprimedec_limit_norm 505224
indexpartial 44042
init_m 4366348
init_norm 212348
is_uniformizer 498236
lift_to_zk 91217
loop 237142
manage_cache 700236
maxord 1530168
maxord_disc 711204
maxord_i 452850
minval 15728
mk_pr 4241974
modpr_TAU 3524853
modpr_genFq 4326
modprinit 1157601
mul_intersect 697803
mycaract 700282
newtoncharpoly 693596
newtonsums 700294
nfM_to_FqM 5648
nfV_to_FqV 167403
nfXQ_mul 62376
nfX_mul 66863
nfX_rem 62376
nfX_sub 4487
nfX_to_FqX 10094
nfX_to_monic 1652
nf_pV_to_prV 38528
nf_to_Fq 15173537
nf_to_Fq_init 3511835
nfbasis 938
nfcompositum 13347
nfcompositum_lambda 497
nfdisc 66429
nfdiscfactors 644780
nfidealdet1 63
nfmaxord 100699
nfmaxord_check_args 811904
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4362858
p_is_prime 2056
pol_min 116537
polcompositum0 12808
poldiscfactors 42
poldiscfactors_i 788120
pow_ei_mod_p 732912
pr_factorback 3605
pr_factorback_scal 3605
pradical 212380
primedec_aux 2698466
primedec_end 212383
progress 392523
redelt 48468
redelt_i 63908
rnfallbase 2219
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4522
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 21902
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2218
rnfjoinmodules_i 6558
rnfmaxord 4438
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12285
setPE 745403
set_disc 811867
split_char 475687
sqr_mod 814367
testb2 66805
testc2 48467
to_ff_init 3530558
triv_order 1016
uniformizer 294183
update_den 3526732
update_fact 2077
update_phi 275440
vstar 619787
zk_to_Fq 7113704
zk_to_Fq_init 18711
zkmodprinit 174935
zx_z_div 1524616

Generated by: LCOV version 1.16