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 29115-f22e516b23) Lines: 2208 2407 91.7 %
Date: 2024-03-29 08:06:26 Functions: 154 165 93.3 %
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
bnrnewprec 7
signunits 7
bnf_build_matalpha 20
makematal 20
bnfnewprec 21
nfsign_units 35
get_archclean 40
bnftestprimes 63
get_norm_fact_primes 69
get_y 69
bnf_compactfu_mat 70
myprecdbl 75
Sunits_archclean 77
RgV_is1 91
chinese_unit 94
log2Mbound 94
log2fubound 94
vec_chinese_units 94
bnfnewprec_shallow 97
ZM_remove_unused 164
chinese_unit_slice 274
chinese_unit_worker 274
not_given 375
Buchall_deg1 1155
FlxqX_chinese_unit 1379
bnfinit0 2555
Vbase_to_FB 3307
pr_index 3307
idealHNF_mulred 3561
needed_bitprec 3778
idealmulpowprime2 4544
makecycgen 4956
subFB_change 5300
ZV_mul 7074
try_elt 8436
pr_orbit_fill 11865
get_random_ideal 16825
rnd_rel 16825
makeunits 24894
bnf_build_cycgen 26726
genback 28728
add_to_fact 29580
add_principal_part 31858
expandext 31880
isprincipalfact 31880
bnf_build_units 32048
bnf_compactfu 37134
matbotidembs 38626
matenlarge 38626
RgM_expbitprec 48433
_nfnewprec 57505
matbotid 62093
Buchall 62232
compute_invres 63622
extract_full_lattice 63622
getfu 63622
nthideal 63622
primeneeded 63622
automorphism_perms 63623
class_group_gen 63623
add_cyclotomic_units 63662
delete_cache 63662
init_rel 63662
nfcyclotomicunits 63662
automorphism_matrices 63684
diagact_arch 63719
get_clg2 63719
get_regulator 63719
reallocate 63753
buchall_end 64778
Buchall_param 64786
init_famat 65364
ballvol 65835
subFBgen 65836
FB_aut_perm 65838
FBgen 65839
delete_FB 65839
assign_subFB 66989
bad_check 73549
compute_R 73602
small_norm 89737
clean_cols 90273
compute_multiple_of_R 106119
get_embs 106572
pre_allocate 106601
trim_list 106601
cleanarchunit 132579
init_GRHcheck 133879
free_GRHcheck 133881
nfsign_from_logarch 148716
divide_p_id 162967
isprincipal 174478
nf_cxlog_normalize 195050
modIm 201216
Fincke_Pohst_bound 211186
Fincke_Pohst_ideal 211187
nfsign_tu 226996
nfsign_fu 228248
bnf_build_cheapfu 263487
bnf_has_fu 263767
bad_subFB 271580
bnf_get_ga 271618
bnf_get_GD 276574
triv_gen 461128
GRHchk 493289
divide_p_quo 547535
get_log_embed 729610
cache_prime_dec 915366
set_rel_alpha 936858
rel_embed 1022756
init_red_mod_units 1039007
red_mod_units 1039008
tailres 1122643
dump_gen 1157214
fact_ok 1157820
get_norm_fact 1160467
RgC_expbitprec 1166077
isprincipalarch 1166079
fixarch 1235021
Ur_ZC_mul 1321237
bnf_get_Ur 1321237
ZV_divrem 1321238
split_ideal 1321241
get_pr_lists 1321304
recover_partFB 1321304
bnf_get_vbase 1321324
bnf_get_W 1326217
isprincipalall 1337551
SPLIT 1337647
prec_arch 1339405
factorgen 1500502
GRHok 1526110
bnfisprincipal0 1766732
act_arch 1984594
add 2126035
tailresback 2245276
set_fact 2289860
add_rel 2460865
bnf_get_B 2642496
bnf_get_C 2676976
expbitprec 2683780
cleanarch 2923617
already_known 2965114
add_rel_i 2969196
compute_multiple_of_R_pivot 3086613
divide_p_elt 5815210
divide_p 6525559
addRe_modIm 6584974
get_fs 7460116
store 9297204
Z_issmooth_prod 18935324
can_factor 19710049
step 30239614

Generated by: LCOV version 1.14