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 29806-4d001396c7) Lines: 2197 2397 91.7 %
Date: 2024-12-21 09:08:57 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 1545
divide_p_elt 2238
bnfinit0 2611
Vbase_to_FB 3349
pr_index 3349
idealHNF_mulred 3517
needed_bitprec 3831
idealmulpowprime2 4488
makecycgen 4956
ZV_mul 7283
pr_orbit_fill 11865
makeunits 24901
subFB_change 26166
bnf_build_cycgen 26726
genback 28811
bnf_build_units 32055
add_principal_part 32152
expandext 32173
isprincipalfact 32173
bnf_compactfu 37191
RgM_expbitprec 48565
get_regulator 48663
matbotidembs 54216
matenlarge 54216
get_random_ideal 54836
rnd_rel 54836
_nfnewprec 57733
matbotid 62249
Buchall 62368
class_group_gen 63789
getfu 63790
automorphism_perms 63791
compute_invres 63791
nthideal 63791
primeneeded 63791
extract_full_lattice 63798
automorphism_matrices 63853
add_cyclotomic_units 63858
nfcyclotomicunits 63858
delete_cache 63859
init_rel 63859
reallocate 63859
diagact_arch 63888
get_clg2 63888
buchall_end 64966
Buchall_param 64979
init_famat 65538
FBgen 66034
delete_FB 66035
FB_aut_perm 66036
ballvol 66036
subFBgen 66036
small_norm 66044
assign_subFB 66755
clean_cols 91642
bad_check 95501
compute_R 95565
compute_multiple_of_R 120217
get_embs 120909
pre_allocate 120947
trim_list 120947
cleanarchunit 132979
free_GRHcheck 134154
init_GRHcheck 134154
nfsign_from_logarch 148894
divide_p_id 163556
isprincipal 174534
nf_cxlog_normalize 194923
modIm 201904
nfsign_tu 227150
nfsign_fu 228318
bnf_build_cheapfu 263702
Fincke_Pohst_bound 263957
Fincke_Pohst_ideal 263959
bnf_has_fu 263981
bnf_get_ga 271837
bnf_get_GD 276793
bad_subFB 306054
triv_gen 462861
GRHchk 494671
compute_multiple_of_R_pivot 556983
get_log_embed 720845
cache_prime_dec 918014
set_rel_alpha 938897
rel_embed 1007463
init_red_mod_units 1039917
red_mod_units 1039917
tailres 1125600
dump_gen 1158015
fact_ok 1158567
get_norm_fact 1161436
isprincipalarch 1167046
RgC_expbitprec 1167048
SPLIT_i 1204347
fixarch 1236209
ZV_divrem 1322282
Ur_ZC_mul 1322284
bnf_get_Ur 1322284
split_ideal 1322285
get_pr_lists 1322348
recover_partFB 1322348
bnf_get_vbase 1322368
bnf_get_W 1327261
isprincipalall 1338645
SPLIT 1338691
prec_arch 1340433
GRHok 1528647
bnfisprincipal0 1769269
fact_update 1971431
act_arch 1986726
add 2128063
set_fact 2240720
tailresback 2251185
add_rel 2412590
bnf_get_B 2644586
bnf_get_C 2679098
expbitprec 2686601
add_to_fact 2831304
already_known 2885563
add_rel_i 2889678
cleanarch 2927667
divide_p_quo 5231777
divide_p 5397568
addRe_modIm 6593844
get_fs 7481202
store 9118457
factorgen 16659298
can_factor 18001334
step 28018022

Generated by: LCOV version 1.16