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 - base4.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 29950-285c5b69ed) Lines: 1697 1846 91.9 %
Date: 2025-02-05 09:09:51 Functions: 170 185 91.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Z_dcba_rec 0
Z_ppgle 0
ext_pow 0
famat_Z_gcd 0
famat_idealfactor 0
famat_to_nf 0
idealHNF_Z_factor 0
idealapprfact 0
idealpseudomin_nonscalar 0
nfdivmodpr 0
nfkermodpr 0
nfpowmodpr 0
nfsolvemodpr 0
to_famat 0
vecpow 0
err_divexact 7
hnf_QC_QC 7
idealmin 7
nfmulmodpr 7
ramified_root_simple 7
idealappr 14
idealappr0 14
not_in_ideal 14
chk_vdir 21
hnf_Q_Q 21
idealintersect 21
idealismaximal_mat 21
mat_ideal_two_elt2 21
ZV_cba 28
in_ideal 28
trivial_merge 28
idealaddmultoone 35
idealismaximal_int 42
idealtwoelt2 42
ZV_cba_extend 49
idealdiv0 56
matreduce 63
hnf_Z_QC 70
idealaddtoone0 70
idealmul0 70
hnf_Q_QC 77
hnf_Z_ZC 77
idealismaximal 77
idealismaximal_i 77
idealcoprime 84
nfV_eltembed 84
nfV_idealhnf 84
nfweilheight 84
nfweilheight_i 84
isideal 91
vec_mulid 91
idealaddtoone 98
sunits_makecoprime 98
nf_coprime_part 126
gpidealfactor 182
idealhnf0 413
idealprodprime 525
idealhnf 595
famat_to_Fp_coprime 693
idealprod 826
vecinv 826
vecdiv 903
idealprodval 1819
idealtwoelt0 2485
idealpow0 2499
idealdown 3038
idealispower 3926
idealdivexact 5034
gpidealval 7119
ramified_root 7789
idealsqrtn_int 7796
famat_div_shallow 10304
make_integral 10920
_mul 11365
idealdivpowprime 11971
nf_get_Gtwist1 12597
twistG 12639
famatV_factorback 13765
idealred_elt 13809
idealmulred 17207
idealaddtoone_i 17605
pr_inv 17822
famat_to_nf_moddivisor 20118
ext_inv 20410
famat_sub 20942
famat_sqr 22921
idealfactor_partial 25508
famat_inv_shallow 26969
Q_nffactor 28170
prV_e_muls 28174
_idealmulred 28572
ext_sqr 33869
_idealsqrred 35654
_sqr 35654
idealcoprimefact 37210
pr_inv_p 38398
idealsqr 38902
idealsqr_aux 38902
idealdiv 39316
famatV_zv_factorback 46753
idealredmodpower 49166
famat_remove_trivial 53791
idealapprfact_i 54037
pr_uniformizer 58170
famat_pow 60642
ext_mul 60755
prV_primes 61075
factorbackprime 61535
famat_pow_shallow 62036
addmul_mat 65203
idealHNF_inv 68395
idealpowred 80266
idealadd 81609
prV_lcm_capZ 81995
famat_mulpow_shallow 88309
p_makecoprime 94859
idealtwoelt 96826
RM_round_maxrank 97417
idealredmodpower_i 98322
idealnorm 104631
idealinv 114137
get_random_a 117237
famat_mulpows_shallow 118548
nf_to_Fp_coprime 120162
famat_pows_shallow 123144
to_Fp_coprime 123340
idealred0 138662
nf_get_Gtwist 138669
idealpseudomin 142950
append 151941
famat_add 158605
famatsmall_reduce 176594
vecsqr 185983
Q_to_famat 197149
famat_inv 199364
famat_div 200157
famat_mul_shallow 200592
idealHNF_inv_Z 210503
ok_elt 223330
idealHNF_factor 239605
mat_ideal_two_elt 249767
idealmulelt 264958
idealfactor 267425
idealfactor_limit 267895
idealpows 274612
idealHNF_Z_factor_i 285355
idealHNF_factor_i 285355
idealsqrprime 285643
famat_reduce 295921
Z_to_famat 376357
idealnumden 379234
Z_cba 413000
famat_mul 447430
idealHNF_mul 469945
idealmul 506117
idealmul_aux 506117
Z_ppio 532903
ZM_famat_limit 568191
idealaddtoone_raw 713100
_idealaddtoone 730709
idealhnf_two 738579
idealmulpowprime 767421
idealpow 888559
idealpow_aux 888563
idealHNF_mul_two 922924
idealpowprime 1196363
idealpseudominvec 1204363
idealpseudored 1285445
idealhnf_principal 1309396
lcmuu 1588037
idealhnf_shallow 1720447
famat_makecoprime 2003839
to_famat_shallow 2688556
pr_hnf 3579238
Z_cba_rec 3766434
idealHNF_norm_pval 4043401
zk_pvalrem 4094642
nf_remove_denom_p 4140474
idealHNF_val 4178927
Fl_invgen 5711637
idealval 9397642
idealtyp 15839215
vecmul 16005547
Z_ppo 18157507
u_ppo 54219381

Generated by: LCOV version 1.16