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.1 lcov report (development 28880-3b5364847c) Lines: 2207 2406 91.7 %
Date: 2023-12-01 07:53:15 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 1127
FlxqX_chinese_unit 1379
bnfinit0 2548
Vbase_to_FB 3307
pr_index 3307
idealHNF_mulred 3561
needed_bitprec 3778
idealmulpowprime2 4544
makecycgen 4956
subFB_change 5248
try_elt 8288
ZV_mul 9004
pr_orbit_fill 11865
get_random_ideal 16669
rnd_rel 16669
makeunits 24894
bnf_build_cycgen 26725
genback 28721
add_to_fact 29354
add_principal_part 31859
expandext 31872
isprincipalfact 31873
bnf_build_units 32046
bnf_compactfu 37135
matbotidembs 38494
matenlarge 38495
RgM_expbitprec 48426
_nfnewprec 57505
matbotid 62093
Buchall 62195
automorphism_perms 63614
extract_full_lattice 63614
compute_invres 63615
getfu 63615
primeneeded 63615
class_group_gen 63616
nthideal 63616
delete_cache 63652
add_cyclotomic_units 63654
init_rel 63654
nfcyclotomicunits 63654
automorphism_matrices 63678
get_clg2 63710
diagact_arch 63711
get_regulator 63712
reallocate 63743
Buchall_param 64740
buchall_end 64742
init_famat 65357
delete_FB 65829
FBgen 65830
ballvol 65830
subFBgen 65830
FB_aut_perm 65831
assign_subFB 66943
bad_check 73519
compute_R 73572
small_norm 89740
clean_cols 90120
compute_multiple_of_R 105966
get_embs 106419
pre_allocate 106448
trim_list 106448
cleanarchunit 132565
free_GRHcheck 133872
init_GRHcheck 133872
nfsign_from_logarch 148711
divide_p_id 163071
isprincipal 174478
nf_cxlog_normalize 195050
modIm 201202
Fincke_Pohst_bound 211004
Fincke_Pohst_ideal 211004
nfsign_tu 226886
nfsign_fu 228093
bnf_build_cheapfu 263381
bnf_has_fu 263661
bad_subFB 271539
bnf_get_ga 277018
bnf_get_GD 281974
triv_gen 460943
GRHchk 493231
divide_p_quo 556716
get_log_embed 729400
cache_prime_dec 915282
set_rel_alpha 936829
rel_embed 1022394
init_red_mod_units 1038099
red_mod_units 1038099
tailres 1122535
fact_ok 1154982
dump_gen 1156304
get_norm_fact 1159551
isprincipalarch 1165168
RgC_expbitprec 1165170
fixarch 1234109
Ur_ZC_mul 1320325
ZV_divrem 1320325
bnf_get_Ur 1320325
split_ideal 1320326
get_pr_lists 1320390
recover_partFB 1320390
bnf_get_vbase 1320409
bnf_get_W 1325302
isprincipalall 1336641
SPLIT 1336735
prec_arch 1338510
factorgen 1499936
GRHok 1526043
bnfisprincipal0 1765641
act_arch 1994434
add 2147175
tailresback 2245086
set_fact 2289552
add_rel 2460428
bnf_get_B 2640671
expbitprec 2673130
bnf_get_C 2675170
cleanarch 2921763
already_known 2964272
add_rel_i 2968327
compute_multiple_of_R_pivot 3087056
divide_p_elt 5815049
divide_p 6534770
addRe_modIm 6563650
get_fs 7455963
store 9305566
Z_issmooth_prod 18940168
can_factor 19708819
step 30244123

Generated by: LCOV version 1.14