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 - buch2.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.2 lcov report (development 29466-df46cf9131) Lines: 2190 2395 91.4 %
Date: 2024-07-26 09:04:52 Functions: 155 166 93.4 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
bnrnewprec_shallow 0
dbg_newrel 0
err_units 0
expand 0
i2print 0
inv_fact 0
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
wr_rel 0
be_honest 7
bnfnewprec 7
bnrnewprec 7
signunits 7
bnf_build_matalpha 20
makematal 20
nfsign_units 35
get_archclean 40
bnftestprimes 63
get_norm_fact_primes 69
get_y 69
bnf_compactfu_mat 70
Sunits_archclean 77
myprecdbl 80
bnfnewprec_shallow 97
chinese_unit 101
log2Mbound 101
log2fubound 101
vec_chinese_units 101
RgV_is1 105
ZM_remove_unused 171
chinese_unit_slice 297
chinese_unit_worker 297
not_given 389
Buchall_deg1 1155
FlxqX_chinese_unit 1499
try_elt 1530
subFB_change 1845
divide_p_elt 2141
bnfinit0 2611
Vbase_to_FB 3335
pr_index 3335
idealHNF_mulred 3483
needed_bitprec 3831
idealmulpowprime2 4474
makecycgen 4956
get_random_ideal 5862
rnd_rel 5862
ZV_mul 7277
pr_orbit_fill 11865
makeunits 24894
bnf_build_cycgen 26726
matbotidembs 28529
matenlarge 28529
genback 28784
bnf_build_units 32048
add_principal_part 32145
expandext 32165
isprincipalfact 32165
bnf_compactfu 37134
RgM_expbitprec 48482
_nfnewprec 56727
matbotid 62135
Buchall 62221
extract_full_lattice 63677
automorphism_perms 63678
class_group_gen 63678
getfu 63678
compute_invres 63679
nthideal 63679
primeneeded 63679
automorphism_matrices 63741
add_cyclotomic_units 63744
nfcyclotomicunits 63744
delete_cache 63745
init_rel 63745
reallocate 63745
get_regulator 63773
diagact_arch 63775
get_clg2 63775
Buchall_param 64833
buchall_end 64834
init_famat 65420
FBgen 65921
ballvol 65921
subFBgen 65921
FB_aut_perm 65922
delete_FB 65922
assign_subFB 66096
bad_check 73196
compute_R 73267
clean_cols 78924
small_norm 89150
compute_multiple_of_R 94635
get_embs 95042
pre_allocate 95077
trim_list 95077
cleanarchunit 132697
init_GRHcheck 134010
free_GRHcheck 134014
nfsign_from_logarch 148684
divide_p_id 163445
isprincipal 174513
nf_cxlog_normalize 194925
Fincke_Pohst_bound 201139
Fincke_Pohst_ideal 201141
modIm 201384
nfsign_tu 227035
nfsign_fu 228221
bnf_build_cheapfu 263545
bnf_has_fu 263824
bnf_get_ga 271829
bad_subFB 275147
bnf_get_GD 276785
triv_gen 462798
GRHchk 493842
compute_multiple_of_R_pivot 515323
get_log_embed 722583
cache_prime_dec 916328
set_rel_alpha 928930
rel_embed 997379
init_red_mod_units 1039948
red_mod_units 1039948
tailres 1123689
dump_gen 1158028
fact_ok 1158577
get_norm_fact 1161446
isprincipalarch 1167058
RgC_expbitprec 1167059
SPLIT_i 1204393
fixarch 1236072
split_ideal 1322271
Ur_ZC_mul 1322274
bnf_get_Ur 1322274
ZV_divrem 1322276
get_pr_lists 1322334
recover_partFB 1322334
bnf_get_vbase 1322354
bnf_get_W 1327247
isprincipalall 1338626
SPLIT 1338681
prec_arch 1340423
GRHok 1527111
bnfisprincipal0 1769195
fact_update 1906067
act_arch 1986260
add 2127846
tailresback 2247359
set_fact 2275081
add_rel 2446657
bnf_get_B 2644562
bnf_get_C 2679067
expbitprec 2685782
add_to_fact 2866749
already_known 2920146
add_rel_i 2924245
cleanarch 2926928
divide_p_quo 5335824
divide_p 5501407
addRe_modIm 6591379
get_fs 7471752
store 9245011
factorgen 18422579
can_factor 19765383
step 30412132

Generated by: LCOV version 1.16