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

Generated by: LCOV version 1.14