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.17.0 lcov report (development 29533-68f6ba3cba) Lines: 2213 2338 94.7 %
Date: 2024-09-16 09:02:59 Functions: 168 172 97.7 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Decomp 253057
Flx_checkdeflate 1593677
Flx_radical 1593660
FpX_radical 5501
Fp_basis 305475
FqM_to_nfM 10316
FqV_to_nfV 0
FqX_non_root 21
FqX_to_nfX 11815
Fq_to_nf 3234926
QXQV_to_FpM 203
QpXV_denom 505543
QpX_denom 2726012
QpX_remove_denom 1730185
RgV_nffix 49
RgX_nffix 279528
RgX_to_algX 1638
Rg_nffix 842597
Rg_to_ff 15167921
ZX_Dedekind 1531261
ZX_rescale_inv 59826
Z_fac 183
Zlx_gcd 244866
Zlx_sylvester_echelon 4653877
ZpM_hnfmodid 451716
ZpX_disc_val 182275
ZpX_gcd 253057
ZpX_monic_factor 490
ZpX_monic_factor_squarefree 1071
ZpX_primedec 0
ZpX_reduced_resultant 986727
ZpX_reduced_resultant_fast 927112
ZpX_resultant_val 3442798
ZpX_resultant_val_i 3486994
ZpX_round4 770
ZpX_sylvester_echelon 72980
_msqr 11137
_sqr 70432
anti_uniformizer 963999
checkmodpr 210
checkprid 17887691
checkprid_i 22825209
compmod 285151
compositum 91
compositum2 2835
compositum_fix 26476
dbasis 617597
diag_denom 97573
diag_denomval 685163
dim1proj 1029628
ei_msqr_mod 343906
errprime 0
expo_is_squarefree 812
fact_from_factors 3591
ffdegree 4109
fill 13074
fix_PE 477
fnz 215990
gen_if_principal 35
get_LV 213252
get_coprimes 273
get_d 2275
get_g 352914
get_gamma 299860
get_maxord 811930
get_modpr 137746
get_module 63
get_norm 500626
get_nu 635986
get_partial_order_as_pols 505545
get_powers 158093
get_pr 409367
get_prid 936572
getprime 558786
ideal_is1 27788
idealprimedec 1270238
idealprimedec_degrees 371
idealprimedec_galois 6552
idealprimedec_kummer 3794671
idealprimedec_limit_f 2695553
idealprimedec_limit_norm 505226
indexpartial 44067
init_m 4369852
init_norm 213217
is_uniformizer 500620
lift_to_zk 91321
loop 237028
manage_cache 699992
maxord 1531263
maxord_disc 711183
maxord_i 452481
minval 15686
mk_pr 4248930
modpr_TAU 3523912
modpr_genFq 4326
modprinit 1157670
mul_intersect 698357
mycaract 700055
newtoncharpoly 693325
newtonsums 700069
nfM_to_FqM 5627
nfV_to_FqV 167403
nfXQ_mul 62166
nfX_mul 66660
nfX_rem 62166
nfX_sub 4494
nfX_to_FqX 10108
nfX_to_monic 1652
nf_pV_to_prV 38534
nf_to_Fq 15167417
nf_to_Fq_init 3510986
nfbasis 938
nfcompositum 13351
nfcompositum_lambda 497
nfdisc 66429
nfdiscfactors 644759
nfidealdet1 63
nfmaxord 100748
nfmaxord_check_args 811933
nfmodpr 329
nfmodprinit 7
nfmodprinit0 70
nfmodprlift 77
nfreducemodpr 210
ok_modpr 4362015
p_is_prime 2152
pol_min 116629
polcompositum0 12812
poldiscfactors 42
poldiscfactors_i 788134
pow_ei_mod_p 734723
pr_factorback 3605
pr_factorback_scal 3605
pradical 213248
primedec_aux 2702457
primedec_end 213251
progress 392003
redelt 48121
redelt_i 63642
rnfallbase 2219
rnfbasis 21
rnfdedekind 91
rnfdedekind_i 4529
rnfdet 14
rnfdisc_factored 854
rnfdiscf 77
rnfeltid_powmod 21818
rnfhnfbasis 7
rnfisfree 7
rnfjoinmodules 2218
rnfjoinmodules_i 6537
rnfmaxord 4445
rnfsimplifybasis 0
rnfsteinitz 28
safe_Z_pvalrem 12306
setPE 745476
set_disc 811898
split_char 475756
sqr_mod 815625
testb2 66765
testc2 48121
to_ff_init 3529719
triv_order 1016
uniformizer 295141
update_den 3528502
update_fact 2084
update_phi 275117
vstar 619328
zk_to_Fq 7112594
zk_to_Fq_init 18711
zkmodprinit 174949
zx_z_div 1525740

Generated by: LCOV version 1.16