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

Generated by: LCOV version 1.16