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 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 - RgX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.10.0 lcov report (development 20704-afbaa81) Lines: 1306 1427 91.5 %
Date: 2017-05-26 05:56:59 Functions: 140 154 90.9 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Kronecker_to_mod 189
QXQV_to_mod 1436
QXQXV_to_mod 511
QXQX_to_mod 1792
QXQX_to_mod_shallow 83111
QXQ_powers 1757
QXQ_to_mod 408321
QXQ_to_mod_copy 14515
QXV_QXQ_eval 1106
QXX_QXQ_eval 63
QX_ZXQV_eval 2436
RgM_to_RgXV 40262
RgM_to_RgXX 15162
RgV_to_RgM 70241
RgV_to_RgX 387514
RgV_to_RgX_reverse 149566
RgXQC_red 0
RgXQM_mul 0
RgXQM_red 0
RgXQV_RgXQ_mul 56
RgXQV_red 56
RgXQX_RgXQ_mul 28
RgXQX_divrem 19412
RgXQX_mul 0
RgXQX_pseudodivrem 52788
RgXQX_pseudorem 24534
RgXQX_red 3927
RgXQX_sqr 0
RgXQX_translate 5866
RgXQ_matrix_pow 287
RgXQ_minpoly_naive 56
RgXQ_norm 32743
RgXQ_pow 17415
RgXQ_powers 2065
RgXQ_powu 205567
RgXV_RgV_eval 2814
RgXV_to_RgM 2149
RgXV_unscale 224
RgXX_to_RgM 21
RgXY_degreex 1
RgXY_swap 224
RgXY_swapspec 11554
RgX_RgV_eval 104244
RgX_RgXQV_eval 0
RgX_RgXQ_eval 44814
RgX_RgXnV_eval 672
RgX_RgXn_eval 0
RgX_Rg_add 10710926
RgX_Rg_add_shallow 2422
RgX_Rg_div 22485397
RgX_Rg_divexact 531799
RgX_Rg_eval_bk 0
RgX_Rg_mul 65778465
RgX_Rg_sub 32411
RgX_add 16206326
RgX_addmulXn 663895
RgX_addmulXn_shallow 1904916
RgX_addspec 370387
RgX_addspec_shallow 3153206
RgX_blocks 103291
RgX_deflate 81594
RgX_deriv 209965
RgX_digits 0
RgX_div_by_X_x 34856
RgX_divrem 13853076
RgX_divs 1841
RgX_equal 4179060
RgX_even_odd 26727
RgX_get_0 130935
RgX_get_1 670797
RgX_inflate 112530
RgX_mul 11585750
RgX_mulXn 2857944
RgX_mul_normalized 413967
RgX_mulhigh_i 33179
RgX_muls 13881
RgX_mulspec 13564015
RgX_mulspec_basecase 12769361
RgX_mulspec_basecase_limb 74296575
RgX_neg 985790
RgX_normalize 1456
RgX_pseudodivrem 52669
RgX_pseudorem 24534
RgX_recip 504
RgX_recip_shallow 403842
RgX_recipspec_shallow 295939
RgX_renormalize_lg 718758
RgX_rescale 1211
RgX_rotate_shallow 315273
RgX_shift 3393172
RgX_shift_shallow 57065782
RgX_splitting 40614
RgX_sqr 325398
RgX_sqrspec 327017
RgX_sqrspec_basecase 326200
RgX_sqrspec_basecase_limb 4133460
RgX_sub 10614604
RgX_to_RgC 4008296
RgX_translate 1016290
RgX_unscale 3640
RgX_val 2092367
RgX_valrem 42116910
RgX_valrem_inexact 6820
RgXnV_red_shallow 336
RgXn_eval 1771
RgXn_exp 12586
RgXn_inv 112497
RgXn_mul 3633523
RgXn_mul_basecase 3074153
RgXn_mulhigh 33179
RgXn_powers 336
RgXn_powu 0
RgXn_powu_i 1505
RgXn_red_shallow 79158
RgXn_reverse 84
RgXn_sqr 15645
RgXn_sqr_basecase 665
RgXspec_kill0 32013833
Rg_RgX_sub 379045
Rg_to_RgC 613397
ZXQX_dvd 3511
ZX_translate 375951
ZX_unscale 7336
ZX_unscale2n 11084
ZX_unscale_div 1176
ZX_z_unscale 14931
_RgX_divrem 0
_add 64750
_cmul 110138
_gen_add 20446843
_gen_cmul 316631
_gen_mul 540605
_gen_nored 619335
_gen_one 629569
_gen_sqr 173693
_gen_sub 0
_gen_zero 12159
_mul 101714
_mulXn 1176
_one 104965
_oneXn 1407
_red 70357
_sqr 247867
_sqrXn 1785
_sub 0
_zero 105
_zeroXn 0
brent_kung_optpow 1980165
do_QXQ_eval 1169
gen_RgXQ_eval_powers 9672023
gen_bkeval 1037167
gen_bkeval_powers 6233931
get_Rg_algebra 70970
rem 707096

Generated by: LCOV version 1.11