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.14.0 lcov report (development 27920-e0b3650d81) Lines: 2170 2358 92.0 %
Date: 2022-08-07 07:33:29 Functions: 150 161 93.2 %
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 21
bnfnewprec 21
makematal 21
nfsign_units 35
get_archclean 42
bnf_compactfu_mat 63
bnftestprimes 63
Sunits_archclean 77
get_norm_fact_primes 77
get_y 77
RgV_is1 91
bnfnewprec_shallow 98
chinese_unit 101
log2Mbound 101
log2fubound 101
vec_chinese_unit 101
myprecdbl 128
ZM_remove_unused 164
chinese_unit_slice 273
chinese_unit_worker 273
not_given 383
Buchall_deg1 1050
FlxqX_chinese_unit 1349
bnfinit0 2401
subFB_change 2404
Vbase_to_FB 3233
pr_index 3233
idealHNF_mulred 3473
needed_bitprec 3979
idealmulpowprime2 4512
makecycgen 4956
ZV_mul 9193
try_elt 9470
pr_orbit_fill 11865
get_random_ideal 14160
rnd_rel 14160
add_to_fact 20513
makeunits 24874
bnf_build_cycgen 26726
genback 28686
add_principal_part 29594
expandext 29608
isprincipalfact 29608
bnf_build_units 31850
bnf_compactfu 37037
matbotidembs 46203
matenlarge 46203
RgM_expbitprec 48307
_nfnewprec 54227
matbotid 61989
Buchall 62115
automorphism_perms 63467
class_group_gen 63467
compute_invres 63467
primeneeded 63467
getfu 63468
nthideal 63469
extract_full_lattice 63476
add_cyclotomic_units 63516
delete_cache 63516
init_rel 63516
nfcyclotomicunits 63516
automorphism_matrices 63530
diagact_arch 63567
get_clg2 63567
get_regulator 63573
reallocate 63611
buchall_end 64519
Buchall_param 64522
init_famat 65162
FB_aut_perm 65692
FBgen 65692
subFBgen 65692
delete_FB 65693
assign_subFB 66155
bad_check 72486
compute_R 72540
triv_gen 75529
clean_cols 95044
compute_multiple_of_R 110242
get_embs 113918
small_norm 114147
pre_allocate 128521
trim_list 128521
init_GRHcheck 132900
free_GRHcheck 132904
nfsign_from_logarch 148584
divide_p_id 162630
isprincipal 174853
nf_cxlog_normalize 194060
nfsign_tu 226640
nfsign_fu 227849
bnf_build_cheapfu 263123
bnf_has_fu 263360
bad_subFB 270989
bnf_get_ga 277330
bnf_get_GD 282286
divide_p_quo 390368
init_red_mod_units 429380
red_mod_units 429380
GRHchk 492084
Fincke_Pohst_ideal 509998
fact_ok 545225
dump_gen 546557
get_norm_fact 550012
RgC_expbitprec 555637
isprincipalarch 555638
fixarch 624345
split_ideal 711145
ZV_divrem 711153
Ur_ZC_mul 711154
bnf_get_Ur 711154
bnf_get_W 711166
get_pr_lists 711210
recover_partFB 711210
bnf_get_vbase 711229
get_log_embed 721870
isprincipalall 724917
prec_arch 726513
SPLIT 727557
bnfisprincipal0 770769
factorgen 787789
set_rel_alpha 895578
cache_prime_dec 912939
rel_embed 999629
tailres 1119970
act_arch 1384920
add 1394430
bnf_get_B 1422317
bnf_get_C 1451449
expbitprec 1454704
GRHok 1519581
cleanarch 1831131
tailresback 2239963
compute_multiple_of_R_pivot 3253056
set_fact 3301438
add_rel 3471881
already_known 3954436
add_rel_i 3958444
addRe_modIm 4309025
divide_p_elt 7168541
get_fs 7433762
divide_p 7721500
store 12125027
smooth_norm 29996398
can_factor 30306396
step 44423665

Generated by: LCOV version 1.13