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-bordeaux1.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 - FpX.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17404-c89e0b8) Lines: 1018 1107 92.0 %
Date: 2015-01-29 Functions: 131 135 97.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 484 624 77.6 %

Function Name Sort by function name Hit count Sort by hit count
FpX_red 64079373
get_FpX_red 51944028
FpX_mul 51242398
FpX_divrem_basecase 49313810
FpX_rem 49067007
FpXQ_mul 37925810
to_Flx 36744681
FpX_subspec 13235548
FpX_sub 13145976
FpX_add 4976990
FpX_Fp_mulspec 3183498
FpX_Fp_mul 3182350
FpXQ_red 3138083
FpX_divrem 2877021
FpX_sqr 2183471
FpXQ_sqr 2151068
_FpXQ_sqr 1649575
FpX_mulu 1056457
get_FpX_degree 818458
get_FpX_var 757838
FpX_center 580328
to_Flxq 569221
_FpXQ_cmul 533294
FpX_Fp_add 484086
FpX_eval 479699
_FpXQ_add 479105
FpX_deriv 449072
FpXT_red 373263
FpX_extgcd 355875
get_FpX_mod 351400
FpX_mulspec 330813
FpXQ_invsafe 324697
FpXQ_inv 324197
_FpXQ_mul 304973
FpXQ_pow 273790
FpX_extgcd_basecase 268570
FpXQ_div 256167
FpX_normalize 241108
ZX_lgrenormalizespec 179773
FpX_recipspec 179182
FpX_neg 159286
FpX_FpXQ_eval 152341
FpXV_red 146696
_FpXQ_red 132297
_FpXQ_one 126897
FpX_get_red 126222
FpXQ_powers 95943
FpX_divrem_Barrettspec 89572
FpX_divrem_Barrett_noGC 89170
FpX_gcd 88816
FpX_Fp_sub 85916
FpX_Frobenius 71569
random_FpX 61067
FpXQ_log 58501
_FpX_mul 54727
FpXQ_powu 52086
FpX_Fp_mul_to_monic 51494
FpX_FpXQV_eval 51372
Fq_issquare 46578
Fp_issquare 46578
Fp_FpXQ_log 37059
_FpX_divrem 36386
FpX_valrem 23429
FpX_gcd_basecase 18693
FpX_div_by_X_x 18421
FpXV_prod 18204
Fp_FpX_sub 16458
FpXQ_pow_Frobenius 15788
_FpXQ_pow 15187
_FpX_sqr 13328
FpX_rescale 13237
FpXQ_trace 10277
FpXQ_sqrtn 7858
FpXQ_sqrt 7035
FpXQ_matrix_pow 6544
gener_FpXQ 6511
FpX_resultant 5035
_FpX_add 4858
FpV_roots_to_pol 4699
bounded_order 3876
FpX_digits 3423
FpX_powu 3003
FpXQ_charpoly 2956
FpXQ_minpoly 2955
FpX_matFrobenius 2512
FpV_inv 2423
FpXQ_issquare 2322
_FpXQ_rand 2313
FpX_is_squarefree 2149
FpXQ_autsum_mul 1769
FpX_invBarrett 1640
FpX_invBarrett_basecase 1598
Fq_log 1575
FpX_Fp_sub_shallow 1528
FpX_fromdigits 1449
gener_FpXQ_i 1443
gener_FpXQ_local 1428
get_FpXQ_star 1271
FpXQ_autsum_sqr 927
FpX_addmulmul 914
FpXQ_autsum 913
FpX_halve 875
Z_to_FpX 870
_FpXQ_easylog 839
FpX_chinese_coprime 665
FpXQ_autpow_sqr 557
Fp_red_FpX 555
FpXQ_autpowers 532
FpXQ_autpow 529
FpXM_FpX_mul2 453
FpX_halfgcd 347
FpX_halfgcd_i 303
FpX_halfgcd_basecase 156
FpXM_mul2 151
FpX_halfgcd_split 147
FpX_FpXM_qmul 147
FpXC_FpXQV_eval 112
FpX_invBarrett_Newton 38
FpXQ_order 36
FpXM_FpXQV_eval 28
FpXQM_autsum_mul 28
_FpXQ_zero 16
FpXQM_autsum 14
Fp_neg_FpX 14
FpX_disc 14
FpXQM_autsum_sqr 14
FpXQ_conjvec 8
FpXQ_autpow_mul 7
FpX_extgcd_halfgcd 4
matid2_FpXM 4
FpXQ_norm 1
FpX_Fp_add_shallow 0
FpX_gcd_check 0
FqV_inv 0
famat_Z_gcd 0

Generated by: LCOV version 1.9