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.18.0 lcov report (development 29712-7c8a932571) Lines: 2197 2397 91.7 %
Date: 2024-11-15 09:08:45 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
myprecdbl 73
Sunits_archclean 77
chinese_unit 94
log2Mbound 94
log2fubound 94
vec_chinese_units 94
bnfnewprec_shallow 97
RgV_is1 105
ZM_remove_unused 164
chinese_unit_slice 274
chinese_unit_worker 274
not_given 389
Buchall_deg1 1176
FlxqX_chinese_unit 1379
try_elt 1581
divide_p_elt 2276
bnfinit0 2611
Vbase_to_FB 3349
pr_index 3349
idealHNF_mulred 3522
needed_bitprec 3831
idealmulpowprime2 4488
makecycgen 4956
ZV_mul 7283
pr_orbit_fill 11865
makeunits 24901
subFB_change 26202
bnf_build_cycgen 26726
genback 28812
bnf_build_units 32055
add_principal_part 32152
expandext 32173
isprincipalfact 32173
bnf_compactfu 37191
RgM_expbitprec 48566
get_regulator 48662
matbotidembs 54265
matenlarge 54267
rnd_rel 54882
get_random_ideal 54883
_nfnewprec 57730
matbotid 62251
Buchall 62366
automorphism_perms 63789
class_group_gen 63791
compute_invres 63791
getfu 63791
nthideal 63791
primeneeded 63791
extract_full_lattice 63798
automorphism_matrices 63852
add_cyclotomic_units 63860
nfcyclotomicunits 63860
delete_cache 63861
init_rel 63861
reallocate 63861
diagact_arch 63887
get_clg2 63887
buchall_end 64966
Buchall_param 64977
init_famat 65539
ballvol 66037
delete_FB 66037
FB_aut_perm 66038
FBgen 66038
subFBgen 66038
small_norm 66048
assign_subFB 66778
clean_cols 91654
bad_check 95542
compute_R 95604
compute_multiple_of_R 120270
get_embs 120963
pre_allocate 121000
trim_list 121000
cleanarchunit 132976
init_GRHcheck 134152
free_GRHcheck 134154
nfsign_from_logarch 148888
divide_p_id 163556
isprincipal 174534
nf_cxlog_normalize 194923
modIm 201903
nfsign_tu 227144
nfsign_fu 228320
bnf_build_cheapfu 263704
bnf_has_fu 263983
Fincke_Pohst_bound 264009
Fincke_Pohst_ideal 264012
bnf_get_ga 271837
bnf_get_GD 276793
bad_subFB 306145
triv_gen 462861
GRHchk 494661
compute_multiple_of_R_pivot 557795
get_log_embed 720930
cache_prime_dec 918001
set_rel_alpha 939043
rel_embed 1007657
init_red_mod_units 1039916
red_mod_units 1039917
tailres 1125590
dump_gen 1158017
fact_ok 1158567
get_norm_fact 1161436
isprincipalarch 1167045
RgC_expbitprec 1167050
SPLIT_i 1204348
fixarch 1236218
split_ideal 1322282
Ur_ZC_mul 1322283
bnf_get_Ur 1322283
ZV_divrem 1322286
get_pr_lists 1322346
recover_partFB 1322346
bnf_get_vbase 1322365
bnf_get_W 1327258
isprincipalall 1338645
SPLIT 1338691
prec_arch 1340433
GRHok 1528633
bnfisprincipal0 1769270
fact_update 1971620
act_arch 1986742
add 2128093
set_fact 2240846
tailresback 2251176
add_rel 2412711
bnf_get_B 2644582
bnf_get_C 2679097
expbitprec 2686610
add_to_fact 2831404
already_known 2885792
add_rel_i 2889921
cleanarch 2927672
divide_p_quo 5231923
divide_p 5397753
addRe_modIm 6593865
get_fs 7481746
store 9118786
factorgen 16659064
can_factor 18001195
step 28016740

Generated by: LCOV version 1.16