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-04-25 08:08:21 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 26843
famat_inv_shallow 27087
_idealmulred 27415
prV_e_muls 27505
ext_sqr 32557
_idealsqrred 34342
_sqr 34342
idealcoprimefact 37205
idealsqr 37226
idealsqr_aux 37226
famat_sub 37996
famat_div 38003
pr_inv_p 38857
idealdiv 39470
famatV_zv_factorback 46529
idealredmodpower 48586
famat_remove_trivial 53372
idealapprfact_i 53884
factorbackprime 57538
pr_uniformizer 58056
prV_primes 60466
famat_pow 60642
famat_pow_shallow 62603
addmul_mat 65612
idealHNF_inv 77627
idealpowred 79455
prV_lcm_capZ 81835
ext_mul 87622
famat_mulpow_shallow 88438
p_makecoprime 91497
RM_round_maxrank 96210
idealredmodpower_i 97160
idealnorm 99801
idealtwoelt 102110
idealadd 106417
famat_mulpows_shallow 117981
nf_to_Fp_coprime 119336
get_random_a 120160
to_Fp_coprime 122514
famat_pows_shallow 123042
idealred0 135820
nf_get_Gtwist 135827
vecsqr 136899
idealpseudomin 138904
idealinv 147137
famat_add 168143
famatsmall_reduce 173580
append 179288
famat_mul_shallow 200012
idealHNF_inv_Z 215663
ok_elt 226644
idealHNF_factor 239039
idealpows 248008
mat_ideal_two_elt 254378
famat_mul 262794
idealfactor 265596
idealfactor_limit 265968
idealHNF_factor_i 284533
idealHNF_Z_factor_i 284534
idealsqrprime 285286
famat_reduce 295004
idealmulelt 301896
idealnumden 377823
Z_cba 394926
idealHNF_mul 395332
Z_ppio 512533
ZM_famat_limit 567880
idealmul 569039
idealmul_aux 569040
idealhnf_two 696285
idealaddtoone_raw 711882
_idealaddtoone 731329
idealHNF_norm_pval 732307
idealmulpowprime 754568
idealHNF_mul_two 831535
idealpow_aux 839071
idealpow 839075
idealHNF_val 868518
Z_ppo 1075106
idealpowprime 1143274
idealpseudominvec 1203773
idealpseudored 1283457
idealhnf_principal 1363163
lcmuu 1522442
idealhnf_shallow 1741092
famat_makecoprime 2000698
idealval 2157117
to_famat_shallow 2461493
pr_hnf 3603758
Z_cba_rec 3608668
zk_pvalrem 3922605
nf_remove_denom_p 4021201
Fl_invgen 5514214
idealtyp 8749084
vecmul 10854152
u_ppo 53870004

Generated by: LCOV version 1.14