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.2 lcov report (development 29420-55f63b8cfe) Lines: 1716 1816 94.5 %
Date: 2024-07-03 09:03:24 Functions: 139 158 88.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpX_FpC_nfpoleval 8824
Polred 84
QX_table_nfpoleval 95013
RgFV_to_FlxqV 1239
RgF_to_Flxq 8092
ZC_galoisapply 95203
ZM_image_shallow 12990
ZXX_Q_mul 8897
ZX_Q_mul 6395374
ZX_Q_normalize 841274
ZX_Z_normalize 844226
ZX_canon_neg 89773
ZX_cmp 30220
ZX_is_better 52149
ZX_primitive_to_monic 841590
ZX_to_monic 0
badp 49
check_ZKmodule 10869
check_ZKmodule_i 10925
checkabgrp 24108
checkbid 1383551
checkbid_i 1640503
checkbnf 3236079
checkbnf_i 5248607
checkbnr 1824209
checkbnr_i 2007331
checknf 111771183
checknf_i 114800992
checknfelt_mod 556860
checkrnf 298049
checkrnf_i 308293
checksqmat 0
chk_gen 100381
chk_gen_init 14196
chk_gen_prec 32473
cmpii_polred 127903
complex_norm 34944763
elt_galoisapply 49
elt_galoismatrixapply 0
embed_T2 71886
embed_norm 18991357
embednorm_T2 0
factoredpolred 0
factoredpolred2 0
filter 4095
findmindisc 14203
gal_check_pol 2485
galoisapply 126443
get_Tr 83772
get_aut 8162
get_bas_den 203103
get_bnf 26390
get_bnfpol 112
get_nf 115549
get_nfindex 1666
get_nfpol 667440
get_pol 263855
get_polchar 100381
get_red_G 72968
get_roots 232620
idealfrobenius 77
idealfrobenius_aut 70
idealinertiagroup 1834
idealquasifrob 1463
idealramfrobenius 0
idealramfrobenius_aut 616
idealramgroups 126
idealramgroups_aut 2408
idealramgroupstame 1911
idealramgroupswild 497
incl_disc 539
make_G 265665
make_M 265669
make_M_G 265669
make_Tr 28142
nf_basden 90653
nf_get_allroots 0
nf_get_prec 1066082
nf_input_type 85759
nf_multable 83772
nfcertify 3101
nffp_init 175024
nfgaloismatrix 94583
nfgaloismatrixapply 13909
nfgaloispermtobasis 1379
nfinit 6240
nfinit0 10244
nfinit_basic 85760
nfinit_basic_flag 14273
nfinit_basic_partial 3906
nfinit_complete 83770
nfinitred 182
nfinitred2 0
nfisincl 112
nfisincl0 7315
nfisincl_from_fact 7203
nfisincl_from_fact_frac 1232
nfisisom 77
nfmaxord_complete 167542
nfmaxord_to_nf 83772
nfnewprec 161
nfnewprec_shallow 90625
nfpoleval 11151
nfpolred 280
nfsplitting 0
nfsplitting0 1435
nfsplitting_auto 1232
nfsplitting_composite 1421
nftyp 280938
partmap_reverse 7322
partmap_reverse_frac 8083
partmap_reverse_frac_worker 8083
polred 14
polred0 70
polred2 0
polred_aux 4130
polred_init 18291
polredabs 13377
polredabs0 13944
polredabs2 0
polredabs_i 14203
polredabsall 0
polredbest 3514
polredbest_aux 4053
polredbest_i 3871
polredord 21
poltomonic 42
pr_galoisapply 7
pr_galoismatrixapply 0
pr_make 7
prec_fix 298141
primes_certify 3101
quicktrace 386160
rawcheckbnf 46613
rawchecknf 45668
real_norm 167020
remove_duplicates 13944
rnfnewprec 0
rnfnewprec_shallow 0
rnfpolred_i 623
rnfpolredabs 266
rnfpolredbest 357
set_LLL_basis 101782
set_mulid 22557
smallpolred 0
smallpolred2 0
tests_OK 287
try_polmin 136085
tschirnhaus 7618
typv6 124033
v10checknf 233037
v11checkbnf 37457
v13checkgchar 826
v13checkrnf 298658
v9checkgal 665
vecgaloisapply 7
vecgaloismatrixapply 0
zk_galoisapplymod 6255

Generated by: LCOV version 1.16