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.16.2 lcov report (development 29115-f22e516b23) Lines: 1643 1794 91.6 %
Date: 2024-03-29 08:06:26 Functions: 164 179 91.6 %
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
vec_mulid 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
ZV_cba_extend 35
idealaddmultoone 35
idealismaximal_int 35
idealtwoelt2 42
idealdiv0 56
idealismaximal 63
idealismaximal_i 63
matreduce 63
hnf_Z_QC 70
idealaddtoone0 70
idealmul0 70
idealtwoelt0 70
hnf_Q_QC 77
hnf_Z_ZC 77
idealcoprime 84
idealpow0 84
isideal 91
idealaddtoone 98
sunits_makecoprime 98
nf_coprime_part 126
gpidealfactor 182
idealhnf0 210
idealhnf 301
idealprodprime 336
idealprod 462
famat_to_Fp_coprime 763
vecinv 770
vecdiv 903
idealprodval 2722
idealdown 2982
idealispower 3667
idealdivexact 4411
gpidealval 7105
ramified_root 7271
idealsqrtn_int 7278
idealdivpowprime 9983
famat_div_shallow 10311
_mul 10698
make_integral 10976
nf_get_Gtwist1 12571
idealred_elt 12584
twistG 12613
famatV_factorback 13556
idealmulred 16717
pr_inv 18259
idealaddtoone_i 19446
famat_to_nf_moddivisor 20069
ext_inv 20440
famat_inv 20440
famat_sqr 21609
idealfactor_partial 25417
Q_nffactor 26836
famat_inv_shallow 27087
_idealmulred 27415
prV_e_muls 27469
ext_sqr 32557
_idealsqrred 34342
_sqr 34342
idealcoprimefact 37205
idealsqr 37226
idealsqr_aux 37226
famat_sub 37996
famat_div 38003
pr_inv_p 38855
idealdiv 39470
famatV_zv_factorback 46529
idealredmodpower 48587
famat_remove_trivial 53371
idealapprfact_i 53884
factorbackprime 57538
pr_uniformizer 58056
prV_primes 60466
famat_pow 60642
famat_pow_shallow 62603
addmul_mat 65464
idealHNF_inv 77627
idealpowred 79455
prV_lcm_capZ 81835
ext_mul 87622
famat_mulpow_shallow 88438
p_makecoprime 91498
RM_round_maxrank 96209
idealredmodpower_i 97159
idealnorm 99801
idealtwoelt 102111
idealadd 106417
famat_mulpows_shallow 117983
nf_to_Fp_coprime 119336
get_random_a 120159
to_Fp_coprime 122514
famat_pows_shallow 123049
idealred0 135818
nf_get_Gtwist 135824
vecsqr 136899
idealpseudomin 138903
idealinv 147137
famat_add 168143
famatsmall_reduce 173592
append 179288
famat_mul_shallow 200017
idealHNF_inv_Z 215662
ok_elt 226556
idealHNF_factor 239034
idealpows 248009
mat_ideal_two_elt 254379
famat_mul 262794
idealfactor 265601
idealfactor_limit 265972
idealHNF_factor_i 284522
idealHNF_Z_factor_i 284526
idealsqrprime 285285
famat_reduce 295005
idealmulelt 301896
idealnumden 377832
Z_cba 394926
idealHNF_mul 395167
Z_ppio 512533
ZM_famat_limit 567878
idealmul_aux 569031
idealmul 569032
idealhnf_two 696137
idealaddtoone_raw 711878
_idealaddtoone 731324
idealHNF_norm_pval 732112
idealmulpowprime 754065
idealHNF_mul_two 830838
idealpow 838931
idealpow_aux 838932
idealHNF_val 868327
Z_ppo 1074413
idealpowprime 1142623
idealpseudominvec 1203773
idealpseudored 1283454
idealhnf_principal 1363154
lcmuu 1521296
idealhnf_shallow 1741075
famat_makecoprime 2000709
idealval 2156924
to_famat_shallow 2461493
pr_hnf 3603746
Z_cba_rec 3608668
zk_pvalrem 3922622
nf_remove_denom_p 4021214
Fl_invgen 5512743
idealtyp 8748674
vecmul 10856092
u_ppo 53868889

Generated by: LCOV version 1.14