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 29950-285c5b69ed) Lines: 2232 2373 94.1 %
Date: 2025-02-05 09:09:51 Functions: 174 178 97.8 %
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 77
nfmodprlift 77
rnfdiscf 77
compositum 91
rnfdedekind 91
Z_fac 183
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 294
nfmodpr 350
idealprimedec_degrees 371
fix_PE 498
nfcompositum_lambda 511
ZpX_monic_factor 546
rnfdisc_factored 854
expo_is_squarefree 889
ZpX_round4 896
nfbasis 938
ZpX_monic_factor_squarefree 1155
rnfjoinmodules 1231
triv_order 1345
RgX_to_algX 1638
nfX_to_monic 1652
nfM_to_FqM 1798
rnfjoinmodules_i 2022
p_is_prime 2241
update_fact 2352
rnfallbase 2702
get_d 2751
FqM_to_nfM 2826
compositum2 2884
minval 3688
rnfmaxord 3773
pr_factorback 3815
pr_factorback_scal 3815
nfX_sub 3829
rnfdedekind_i 3857
fact_from_factors 4011
fill 4044
ffdegree 4109
_msqr 4130
modpr_genFq 4438
FpX_radical 5685
rnfeltid_powmod 5739
nfXisintegral 6545
idealprimedec_galois 6552
nfpolisintegral 7875
nfpolisintegral_i 7875
ideal_is1 7880
nfX_to_FqX 8771
FqX_to_nfX 9498
polcompositum0 12843
nfcompositum 13396
safe_Z_pvalrem 13986
_sqr 16105
nfXQ_mul 16407
nfX_rem 16407
zk_to_Fq_init 18746
nfX_mul 20236
compositum_fix 26567
nf_pV_to_prVV 26614
nfisintegral 28504
nf_pV_to_prV 38605
indexpartial 44115
redelt 48477
testc2 48477
ZX_rescale_inv 59877
redelt_i 64256
nfdisc 66463
testb2 67195
ZpX_sylvester_echelon 74330
lift_to_zk 91981
diag_denom 99486
nfmaxord 101734
pol_min 117698
get_modpr 137753
get_powers 159478
nfV_to_FqV 167410
zkmodprinit 175446
ZpX_disc_val 184330
init_norm 214588
pradical 214612
get_LV 214613
primedec_end 214613
fnz 221469
loop 238414
Zlx_gcd 246100
Decomp 254728
ZpX_gcd 254730
update_phi 276331
compmod 286886
uniformizer 296990
get_gamma 303269
Fp_basis 307397
RgX_nffix 312104
ei_msqr_mod 347635
get_g 356337
progress 393993
get_pr 411990
ZpM_hnfmodid 454007
maxord_i 454900
split_char 480277
is_uniformizer 503353
get_norm 503355
idealprimedec_limit_norm 505223
QpXV_denom 508850
get_partial_order_as_pols 508855
getprime 563169
dbasis 619634
vstar 623779
get_nu 640933
nfdiscfactors 644766
diag_denomval 685746
newtoncharpoly 698961
mul_intersect 702787
manage_cache 705710
mycaract 705764
newtonsums 705764
maxord_disc 711221
pow_ei_mod_p 738839
setPE 746442
poldiscfactors_i 788599
set_disc 812925
nfmaxord_check_args 812948
get_maxord 812957
sqr_mod 822436
Rg_nffix 919906
ZpX_reduced_resultant_fast 931739
get_prid 939260
pr_anti_uniformizer 966026
ZpX_reduced_resultant 993148
dim1proj 1029774
modprinit 1157474
idealprimedec 1272788
zx_z_div 1531282
ZX_Dedekind 1537002
maxord 1537004
Flx_radical 1599622
Flx_checkdeflate 1599641
QpX_remove_denom 1742010
idealprimedec_limit_f 2700307
primedec_aux 2707237
QpX_denom 2749875
Fq_to_nf 3083495
ZpX_resultant_val 3450604
ZpX_resultant_val_i 3496935
nf_to_Fq_init 3510996
modpr_TAU 3512238
to_ff_init 3529754
update_den 3567042
idealprimedec_kummer 3799066
mk_pr 4256631
ok_modpr 4362300
init_m 4382272
Zlx_sylvester_echelon 4670522
zk_to_Fq 6394614
nf_to_Fq 12637822
gc_nf_to_Fq 13898150
nf_to_Fq_i 13898662
checkprid 17904389
checkprid_i 22873219

Generated by: LCOV version 1.16