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 - base1.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 1713 1802 95.1 %
Date: 2023-08-26 07:54:43 Functions: 139 156 89.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpX_FpC_nfpoleval 8722
Polred 84
QX_table_nfpoleval 94961
RgFV_to_FlxqV 1239
RgF_to_Flxq 8092
ZC_galoisapply 95158
ZM_image_shallow 12701
ZXX_Q_mul 8897
ZX_Q_mul 5755410
ZX_Q_normalize 840756
ZX_Z_normalize 843694
ZX_canon_neg 96333
ZX_cmp 32904
ZX_is_better 54738
ZX_primitive_to_monic 841075
ZX_to_monic 0
badp 49
check_ZKmodule 10547
check_ZKmodule_i 10603
checkabgrp 19789
checkbid 1379760
checkbid_i 1636432
checkbnf 3230002
checkbnf_i 5237854
checkbnr 1819852
checkbnr_i 2002944
checknf 76502464
checknf_i 78385390
checknfelt_mod 267891
checkrnf 288332
checkrnf_i 298275
checksqmat 0
chk_gen 102376
chk_gen_init 14071
chk_gen_prec 32214
cmpii_polred 140363
complex_norm 17658658
elt_galoisapply 49
elt_galoismatrixapply 0
embed_T2 71183
embed_norm 15257206
embednorm_T2 0
factoredpolred 0
factoredpolred2 0
filter 4088
findmindisc 14070
gal_check_pol 2457
galoisapply 126424
get_Tr 83353
get_aut 8140
get_bas_den 202096
get_bnf 22043
get_bnfpol 112
get_nf 115507
get_nfindex 1589
get_nfpol 667334
get_pol 262195
get_polchar 102376
get_red_G 72788
get_roots 202685
idealfrobenius 63
idealfrobenius_aut 56
idealinertiagroup 1834
idealquasifrob 1435
idealramfrobenius 0
idealramfrobenius_aut 616
idealramgroups 112
idealramgroups_aut 2394
idealramgroupstame 1897
idealramgroupswild 497
incl_disc 531
make_G 233824
make_M 233827
make_M_G 233827
make_Tr 27868
nf_basden 59546
nf_get_allroots 0
nf_get_prec 894002
nf_input_type 85212
nf_multable 83354
nfcertify 3101
nffp_init 174290
nfgaloismatrix 94512
nfgaloismatrixapply 13993
nfgaloispermtobasis 1379
nfinit 6128
nfinit0 9943
nfinit_basic 85216
nfinit_basic_flag 14147
nfinit_basic_partial 3906
nfinit_complete 83348
nfinitred 182
nfinitred2 0
nfisincl 112
nfisincl0 7308
nfisincl_from_fact 7196
nfisincl_from_fact_frac 1232
nfisisom 77
nfmaxord_complete 166701
nfmaxord_to_nf 83352
nfnewprec 154
nfnewprec_shallow 59518
nfpoleval 11151
nfpolred 273
nfsplitting 0
nfsplitting0 1435
nfsplitting_auto 1232
nfsplitting_composite 1421
nftyp 80605
partmap_reverse 7315
partmap_reverse_frac 8085
partmap_reverse_frac_worker 8085
polred 14
polred0 70
polred2 0
polred_aux 4122
polred_init 18157
polredabs 13398
polredabs0 13853
polredabs2 0
polredabs_i 14077
polredabsall 0
polredbest 3514
polredbest_aux 4046
polredbest_i 3871
polredord 21
poltomonic 42
pr_galoisapply 7
pr_galoismatrixapply 0
pr_make 7
prec_fix 266042
primes_certify 3101
quicktrace 384825
rawcheckbnf 46409
rawchecknf 45401
real_norm 164450
remove_duplicates 13853
rnfpolred_i 588
rnfpolredabs 231
rnfpolredbest 357
set_LLL_basis 101236
set_mulid 22452
smallpolred 0
smallpolred2 0
tests_OK 283
try_polmin 136060
tschirnhaus 7569
typv6 110810
v10checknf 39480
v11checkbnf 37218
v13checkgchar 798
v13checkrnf 288920
v9checkgal 658
vecgaloisapply 7
vecgaloismatrixapply 0
zk_galoisapplymod 6153

Generated by: LCOV version 1.14