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 28676-df828f1c94) Lines: 2196 2396 91.7 %
Date: 2023-08-26 07:54:43 Functions: 152 163 93.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Buchall 62182
Buchall_deg1 1127
Buchall_param 64723
FB_aut_perm 65808
FBgen 65808
Fincke_Pohst_ideal 404906
FlxqX_chinese_unit 1940
GRHchk 493133
GRHok 1525943
RgC_expbitprec 1165270
RgM_expbitprec 48411
RgV_is1 91
SPLIT 1336634
Sunits_archclean 77
Ur_ZC_mul 1320225
Vbase_to_FB 3166
ZM_remove_unused 163
ZV_divrem 1320228
ZV_mul 9110
Z_issmooth_prod 15262771
_nfnewprec 54336
act_arch 1994283
add 2155765
addRe_modIm 6563338
add_cyclotomic_units 63632
add_principal_part 31848
add_rel 1880609
add_rel_i 2347951
add_to_fact 15351
already_known 2343947
assign_subFB 66388
automorphism_matrices 63663
automorphism_perms 63600
bad_check 73470
bad_subFB 271426
be_honest 7
bnf_build_cheapfu 263288
bnf_build_cycgen 26739
bnf_build_matalpha 21
bnf_build_units 31968
bnf_compactfu 37128
bnf_compactfu_mat 70
bnf_get_B 2640474
bnf_get_C 2674689
bnf_get_GD 281985
bnf_get_Ur 1320225
bnf_get_W 1325217
bnf_get_ga 277016
bnf_get_vbase 1320311
bnf_has_fu 263565
bnfinit0 2541
bnfisprincipal0 1765539
bnfnewprec 21
bnfnewprec_shallow 98
bnftestprimes 63
bnrnewprec 7
bnrnewprec_shallow 0
buchall_end 64729
cache_prime_dec 915086
can_factor 16027078
chinese_unit 93
chinese_unit_slice 292
chinese_unit_worker 292
class_group_gen 63601
clean_cols 85077
cleanarch 2921846
cleanarchunit 132536
compute_R 73553
compute_invres 63601
compute_multiple_of_R 100421
compute_multiple_of_R_pivot 2661777
dbg_newrel 0
delete_FB 65809
delete_cache 63632
diagact_arch 63699
divide_p 4619283
divide_p_elt 3920629
divide_p_id 162868
divide_p_quo 535827
dump_gen 1156256
err_units 0
expand 0
expandext 31861
expbitprec 2673271
extract_full_lattice 63602
fact_ok 1154943
factorgen 1325905
fixarch 1234200
free_GRHcheck 133860
genback 28714
get_archclean 42
get_clg2 63699
get_embs 105642
get_fs 7455556
get_log_embed 723502
get_norm_fact 1159636
get_norm_fact_primes 77
get_pr_lists 1320291
get_random_ideal 10371
get_regulator 63699
get_y 77
getfu 63602
i2print 0
idealHNF_mulred 3400
idealmulpowprime2 4347
init_GRHcheck 133851
init_famat 65256
init_red_mod_units 1038200
init_rel 63632
inv_fact 0
isprincipal 174301
isprincipalall 1336530
isprincipalarch 1165268
isprincipalfact 31861
isprincipalfact_or_fail 0
isprincipalforce 0
isprincipalgen 0
isprincipalgenforce 0
log2Mbound 93
log2fubound 93
makecycgen 4969
makematal 21
makeunits 24901
matbotid 62078
matbotidembs 38125
matenlarge 38125
modIm 201176
myprecdbl 146
needed_bitprec 3880
nf_cxlog_normalize 195150
nfcyclotomicunits 63632
nfsign_from_logarch 148624
nfsign_fu 228018
nfsign_tu 226805
nfsign_units 35
not_given 375
nthideal 63602
pr_index 3166
pr_orbit_fill 11865
pre_allocate 110795
prec_arch 1338140
primeneeded 63600
reallocate 63711
recover_partFB 1320290
red_mod_units 1038200
rel_embed 991815
rnd_rel 10371
set_fact 1709886
set_rel_alpha 888704
signunits 7
small_norm 100394
split_ideal 1320227
step 30411710
store 5830330
subFB_change 2203
subFBgen 65809
tailres 1122214
tailresback 2244409
trim_list 110795
triv_gen 460942
try_elt 6072
vec_chinese_units 93
wr_rel 0

Generated by: LCOV version 1.14