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 29115-f22e516b23) Lines: 2213 2337 94.7 %
Date: 2024-04-24 08:07:32 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 189
QXQV_to_FpM 203
checkmodpr 210
nfreducemodpr 210
get_coprimes 266
nfmodpr 329
idealprimedec_degrees 364
fix_PE 476
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 1631
nfX_to_monic 1645
update_fact 2089
rnfjoinmodules 2134
rnfallbase 2184
p_is_prime 2226
get_d 2240
compositum2 2828
pr_factorback 3535
pr_factorback_scal 3535
fact_from_factors 3584
ffdegree 4109
modpr_genFq 4326
rnfmaxord 4354
nfX_sub 4403
rnfdedekind_i 4438
nfM_to_FqM 5382
FpX_radical 5486
rnfjoinmodules_i 6292
idealprimedec_galois 6545
nfX_to_FqX 9751
FqM_to_nfM 9924
_msqr 11347
FqX_to_nfX 11549
safe_Z_pvalrem 12285
fill 12584
polcompositum0 12807
nfcompositum 13347
minval 15119
zk_to_Fq_init 18536
rnfeltid_powmod 21090
compositum_fix 26468
ideal_is1 26815
nf_pV_to_prV 38527
indexpartial 44063
redelt 48012
testc2 48012
ZX_rescale_inv 59518
nfXQ_mul 60745
nfX_rem 60745
redelt_i 63729
nfX_mul 65148
nfdisc 66429
testb2 66537
_sqr 69641
ZpX_sylvester_echelon 72926
lift_to_zk 91427
diag_denom 97329
nfmaxord 100429
pol_min 116868
get_modpr 137746
get_powers 158383
nfV_to_FqV 167403
zkmodprinit 174935
ZpX_disc_val 182378
init_norm 213328
pradical 213362
get_LV 213365
primedec_end 213365
fnz 215971
loop 236776
Zlx_gcd 245079
Decomp 253260
ZpX_gcd 253260
update_phi 274519
RgX_nffix 279456
compmod 284791
uniformizer 295525
get_gamma 299765
Fp_basis 305648
ei_msqr_mod 344181
get_g 352762
progress 391495
get_pr 409828
ZpM_hnfmodid 451328
maxord_i 452087
split_char 475479
is_uniformizer 501822
get_norm 501824
idealprimedec_limit_norm 504838
QpXV_denom 505942
get_partial_order_as_pols 505947
getprime 558343
dbasis 617182
vstar 618606
get_nu 635449
nfdiscfactors 644773
diag_denomval 684926
newtoncharpoly 692718
manage_cache 699162
mycaract 699217
newtonsums 699228
mul_intersect 699240
maxord_disc 711188
pow_ei_mod_p 735168
setPE 745125
poldiscfactors_i 787852
set_disc 811557
get_maxord 811609
nfmaxord_check_args 811623
sqr_mod 816587
Rg_nffix 842263
get_prid 918232
ZpX_reduced_resultant_fast 926057
anti_uniformizer 963824
ZpX_reduced_resultant 985853
dim1proj 1029297
modprinit 1157300
idealprimedec 1269911
zx_z_div 1525715
ZX_Dedekind 1531247
maxord 1531247
Flx_radical 1593612
Flx_checkdeflate 1593638
QpX_remove_denom 1728462
idealprimedec_limit_f 2692697
primedec_aux 2699591
QpX_denom 2724593
Fq_to_nf 3229346
ZpX_resultant_val 3440066
ZpX_resultant_val_i 3484217
nf_to_Fq_init 3508672
modpr_TAU 3521622
to_ff_init 3527230
update_den 3530143
idealprimedec_kummer 3790526
mk_pr 4245475
ok_modpr 4341190
init_m 4366038
Zlx_sylvester_echelon 4650480
zk_to_Fq 7097999
checkprid 10668166
checkprid_i 12233234
nf_to_Fq 15137159
Rg_to_ff 15137657

Generated by: LCOV version 1.14