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 - FpXX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.0 lcov report (development 29806-4d001396c7) Lines: 955 1224 78.0 %
Date: 2024-12-22 09:08:28 Functions: 114 134 85.1 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
FpXQXM_FpXQX_mul2 376
FpXQXM_mul2 161
FpXQXQ_autpow 493
FpXQXQ_autpow_mul 325
FpXQXQ_autpow_sqr 507
FpXQXQ_autsum 1233
FpXQXQ_autsum_mul 1433
FpXQXQ_autsum_sqr 1275
FpXQXQ_auttrace 8
FpXQXQ_auttrace_mul 1
FpXQXQ_auttrace_sqr 1
FpXQXQ_div 0
FpXQXQ_inv 0
FpXQXQ_invsafe 0
FpXQXQ_matrix_pow 0
FpXQXQ_minpoly 44
FpXQXQ_mul 49194
FpXQXQ_pow 1908
FpXQXQ_powers 1965
FpXQXQ_sqr 176117
FpXQXQ_transmul 200
FpXQXQ_transmul_init 88
FpXQXT_red 0
FpXQXV_FpXQX_fromdigits 189
FpXQXV_prod 16723
FpXQXV_red 0
FpXQX_FpXQXM_qmul 161
FpXQX_FpXQXQV_eval 4191
FpXQX_FpXQXQ_eval 855
FpXQX_FpXQ_mul 553700
FpXQX_addmulmul 752
FpXQX_digits 623
FpXQX_disc 35
FpXQX_div_by_X_x 71939
FpXQX_divrem 1070725
FpXQX_divrem_Barrett 85254
FpXQX_divrem_Barrettspec 153180
FpXQX_divrem_basecase 173392
FpXQX_dotproduct 396
FpXQX_extgcd 133798
FpXQX_extgcd_basecase 0
FpXQX_extgcd_halfgcd 0
FpXQX_gcd 14755
FpXQX_gcd_basecase 3896
FpXQX_get_red 12685
FpXQX_halfgcd 44
FpXQX_halfgcd_all 114
FpXQX_halfgcd_all_i 114
FpXQX_halfres 0
FpXQX_halfres_basecase 275
FpXQX_halfres_i 490
FpXQX_halfres_split 215
FpXQX_halfres_update 0
FpXQX_invBarrett 3476
FpXQX_invBarrett_Newton 537
FpXQX_invBarrett_basecase 2918
FpXQX_mul 1386204
FpXQX_mulhigh_i 7399
FpXQX_mulspec 1698485
FpXQX_powu 63
FpXQX_recipspec 248
FpXQX_red 1939844
FpXQX_rem 263338
FpXQX_resultant 63
FpXQX_resultant_basecase 28
FpXQX_sqr 186666
FpXQX_to_mod 532
FpXQX_to_mod_raw 0
FpXQXn_div 721
FpXQXn_exp 0
FpXQXn_expint 178
FpXQXn_inv 714
FpXQXn_mul 44573
FpXQXn_mulhigh 4697
FpXQXn_sqr 0
FpXX_FpX_mul 125645
FpXX_FpX_mulspec 140820
FpXX_Fp_mul 56452
FpXX_add 446122
FpXX_deriv 13405
FpXX_halve 2240
FpXX_integ 0
FpXX_integXn 763
FpXX_mulu 7116
FpXX_neg 2073
FpXX_recipspec 306360
FpXX_red 39976
FpXX_shift 19504
FpXX_sub 30887
FpXX_subspec 152221
FpXXn_red 8442
FpXYQQ_mul 196
FpXYQQ_pow 182
FpXYQQ_redswap 476
FpXYQQ_sqr 280
FpXY_FpXQV_evalx 3852
FpXY_FpXQ_evalx 154
FpXY_FpY_mulspec 15175
FpXY_eval 13657
FpXY_evalx 51552
FpXY_evaly 18799
FqXC_to_mod 14
FqXC_to_mod_raw 0
FqXM_to_mod 0
FqX_to_mod_raw 0
Fq_addmul 36478
Kronecker_to_FpXQX 1892710
ZXX_copy 126
ZXX_is_ZX 246030
ZXX_is_ZX_spec 3643244
ZXX_lgrenormalizespec 316761
ZlXQXn_expint 714
ZlXX_integXn 2702
_FpXQXQ_cmul 125668
_FpXQXQ_mul 45926
_FpXQXQ_one 18963
_FpXQXQ_red 22956
_FpXQXQ_sqr 176117
_FpXQXQ_zero 132
_FpXQX_add 121791
_FpXQX_divrem 9954
_FpXQX_mul 118673
_FpXQX_sqr 1729
_FpXQX_sub 4638
get_FpXQXQ_algebra 352
get_FpXQX_algebra 0
get_FpXQX_red 1334154
matJ2_FpXQXM 0
matid2_FpXQXM 0
polxn_FpXX 44
random_FpXQX 52
to_FlxqX 1253078
to_ZX 53770
to_intmod 2191

Generated by: LCOV version 1.16