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.1 lcov report (development 28880-3b5364847c) Lines: 2212 2336 94.7 %
Date: 2023-12-01 07:53:15 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 826
nfbasis 938
triv_order 1016
ZpX_monic_factor_squarefree 1071
RgX_to_algX 1575
nfX_to_monic 1589
update_fact 2090
rnfjoinmodules 2134
rnfallbase 2184
p_is_prime 2225
get_d 2240
compositum2 2828
pr_factorback 3535
pr_factorback_scal 3535
get_modpr 3549
fact_from_factors 3584
ffdegree 4109
modpr_genFq 4326
rnfmaxord 4326
nfX_sub 4375
rnfdedekind_i 4410
nfV_to_FqV 4482
nfM_to_FqM 5382
FpX_radical 5488
rnfjoinmodules_i 6292
idealprimedec_galois 6587
nfX_to_FqX 9695
FqM_to_nfM 9924
nf_pV_to_prV 10002
_msqr 11347
FqX_to_nfX 11493
safe_Z_pvalrem 12285
fill 12584
polcompositum0 12806
nfcompositum 13345
minval 15119
zk_to_Fq_init 18536
rnfeltid_powmod 21090
compositum_fix 26466
ideal_is1 26815
zkmodprinit 40735
indexpartial 44059
testc2 48020
redelt 48021
ZX_rescale_inv 59513
nfXQ_mul 60745
nfX_rem 60745
redelt_i 63726
nfX_mul 65120
nfdisc 66416
testb2 66532
ZpX_sylvester_echelon 68369
_sqr 69641
lift_to_zk 91427
diag_denom 97316
nfmaxord 100289
pol_min 116866
get_powers 158382
ZpX_disc_val 182375
init_norm 213342
get_LV 213356
primedec_end 213357
pradical 213359
fnz 215938
loop 236773
Zlx_gcd 245074
Decomp 253248
ZpX_gcd 253255
update_phi 274467
RgX_nffix 279365
compmod 284795
uniformizer 295511
get_gamma 299707
Fp_basis 305641
ei_msqr_mod 344164
get_g 352703
progress 391461
get_pr 409814
ZpM_hnfmodid 451307
maxord_i 452069
split_char 475432
idealprimedec_limit_norm 496034
is_uniformizer 501810
get_norm 501818
QpXV_denom 505928
get_partial_order_as_pols 505933
getprime 558239
dbasis 617154
vstar 618498
get_nu 635344
nfdiscfactors 644757
diag_denomval 684840
newtoncharpoly 692143
manage_cache 698561
mycaract 698659
newtonsums 698667
mul_intersect 699214
maxord_disc 711158
pow_ei_mod_p 735141
setPE 745004
dim1proj 747874
get_prid 748230
anti_uniformizer 775385
poldiscfactors_i 787726
get_maxord 811448
nfmaxord_check_args 811461
set_disc 811466
sqr_mod 816549
modprinit 834642
Rg_nffix 841861
ZpX_reduced_resultant_fast 925487
ZpX_reduced_resultant 984459
idealprimedec 1153557
Fq_to_nf 1463576
zx_z_div 1525522
maxord 1531105
ZX_Dedekind 1531117
Flx_checkdeflate 1593456
Flx_radical 1593493
QpX_remove_denom 1727921
idealprimedec_limit_f 2567640
primedec_aux 2574577
QpX_denom 2723989
ZpX_resultant_val 3241116
zk_to_Fq 3253780
ZpX_resultant_val_i 3285246
nf_to_Fq_init 3315130
modpr_TAU 3328047
to_ff_init 3333672
idealprimedec_kummer 3503069
update_den 3525426
ok_modpr 3872153
mk_pr 3958121
init_m 4166602
Zlx_sylvester_echelon 4454647
checkprid 7972822
nf_to_Fq 9163497
Rg_to_ff 9163999
checkprid_i 9262373

Generated by: LCOV version 1.14