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-05-17 08:08:07 Functions: 164 179 91.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Fl_invgen 5516560
Q_nffactor 26823
RM_round_maxrank 96209
ZM_famat_limit 567880
ZV_cba 28
ZV_cba_extend 35
Z_cba 394926
Z_cba_rec 3608668
Z_dcba_rec 0
Z_ppgle 0
Z_ppio 512533
Z_ppo 1075715
_idealaddtoone 731327
_idealmulred 27415
_idealsqrred 34342
_mul 10698
_sqr 34342
addmul_mat 65637
append 179288
chk_vdir 21
err_divexact 7
ext_inv 20440
ext_mul 87622
ext_pow 0
ext_sqr 32557
factorbackprime 57536
famatV_factorback 13556
famatV_zv_factorback 46529
famat_Z_gcd 0
famat_add 168143
famat_div 38003
famat_div_shallow 10311
famat_idealfactor 0
famat_inv 20440
famat_inv_shallow 27087
famat_makecoprime 2000698
famat_mul 262794
famat_mul_shallow 200012
famat_mulpow_shallow 88438
famat_mulpows_shallow 117983
famat_pow 60642
famat_pow_shallow 62603
famat_pows_shallow 123043
famat_reduce 295005
famat_remove_trivial 53372
famat_sqr 21609
famat_sub 37996
famat_to_Fp_coprime 763
famat_to_nf 0
famat_to_nf_moddivisor 20069
famatsmall_reduce 173596
get_random_a 120160
gpidealfactor 182
gpidealval 7105
hnf_QC_QC 7
hnf_Q_Q 21
hnf_Q_QC 77
hnf_Z_QC 70
hnf_Z_ZC 77
idealHNF_Z_factor 0
idealHNF_Z_factor_i 284525
idealHNF_factor 239038
idealHNF_factor_i 284524
idealHNF_inv 77627
idealHNF_inv_Z 215661
idealHNF_mul 395607
idealHNF_mul_two 832484
idealHNF_norm_pval 732520
idealHNF_val 868724
idealadd 106417
idealaddmultoone 35
idealaddtoone 98
idealaddtoone0 70
idealaddtoone_i 19446
idealaddtoone_raw 711880
idealappr 14
idealappr0 14
idealapprfact 0
idealapprfact_i 53884
idealcoprime 84
idealcoprimefact 37205
idealdiv 39470
idealdiv0 56
idealdivexact 4411
idealdivpowprime 9983
idealdown 2982
idealfactor 265587
idealfactor_limit 265958
idealfactor_partial 25417
idealhnf 301
idealhnf0 210
idealhnf_principal 1363155
idealhnf_shallow 1741080
idealhnf_two 696587
idealintersect 21
idealinv 147137
idealismaximal 63
idealismaximal_i 63
idealismaximal_int 35
idealismaximal_mat 21
idealispower 3667
idealmin 7
idealmul 569047
idealmul0 70
idealmul_aux 569047
idealmulelt 301896
idealmulpowprime 755236
idealmulred 16717
idealnorm 99801
idealnumden 377830
idealpow 839359
idealpow0 84
idealpow_aux 839359
idealpowprime 1144216
idealpowred 79454
idealpows 248011
idealprod 462
idealprodprime 336
idealprodval 2722
idealpseudomin 138903
idealpseudomin_nonscalar 0
idealpseudominvec 1203776
idealpseudored 1283456
idealred0 135819
idealred_elt 12584
idealredmodpower 48585
idealredmodpower_i 97160
idealsqr 37226
idealsqr_aux 37226
idealsqrprime 285330
idealsqrtn_int 7278
idealtwoelt 102108
idealtwoelt0 70
idealtwoelt2 42
idealtyp 8749648
idealval 2157341
in_ideal 28
isideal 91
lcmuu 1524202
make_integral 10976
mat_ideal_two_elt 254377
mat_ideal_two_elt2 21
matreduce 63
nf_coprime_part 126
nf_get_Gtwist 135826
nf_get_Gtwist1 12571
nf_remove_denom_p 4021219
nf_to_Fp_coprime 119336
nfdivmodpr 0
nfkermodpr 0
nfmulmodpr 7
nfpowmodpr 0
nfsolvemodpr 0
not_in_ideal 14
ok_elt 226643
p_makecoprime 91498
prV_e_muls 27466
prV_lcm_capZ 81835
prV_primes 60466
pr_hnf 3603705
pr_inv 18259
pr_inv_p 38856
pr_uniformizer 58056
ramified_root 7271
ramified_root_simple 7
sunits_makecoprime 98
to_Fp_coprime 122514
to_famat 0
to_famat_shallow 2461493
trivial_merge 28
twistG 12613
u_ppo 53871806
vec_mulid 7
vecdiv 903
vecinv 770
vecmul 10845980
vecpow 0
vecsqr 136899
zk_pvalrem 3922632

Generated by: LCOV version 1.14