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 - FF.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31041-bd73e9fcdd) Lines: 89.3 % 1443 1289
Test Date: 2026-07-22 22:45:42 Functions: 91.9 % 149 137
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
F3x_equalm1 0
FFX_add 0
FFX_halfgcd 0
FFX_nbroots 0
FF_to_F2xq_i 0
FF_to_Flxq_i 0
Fp_cmp_1 0
FqV_to_FFV 0
FqX_to_FFX 0
RgC_is_FFC 0
RgM_is_FFM 0
Rg_is_FF 0
FFXQ_sqr 7
FFX_ddf 7
FFX_factor_squarefree 7
FF_ellmul 7
FF_issquare 7
FFV_roots_to_pol 14
FFXQ_inv 14
FF_ellcard_SEA 14
FFM_indexrank 21
FFX_extgcd 21
FFX_halfgcd_all 21
FFX_resultant 21
gc_gcdext 21
raw_to_FFXM 21
FF_charpoly 28
FF_conjvec 28
FF_norm 28
FF_trace 28
FFM_suppl 35
FFX_disc 35
FF_Frobenius 42
FF_equalm1 42
FFM_image 49
raw_to_FFXC 49
FFM_FFC_gauss 56
FF_order 56
FFM_FFC_invimage 63
FFM_det 63
FFM_gauss 63
fforder 63
FFM_rank 70
FFM_ker 77
FFXQ_minpoly 77
FFM_deplin 84
FFM_FFC_mul 91
FF_elllog 91
FF_elltatepairing 98
FFM_invimage 105
FFXQ_mul 105
FF_p 112
FF_elldata 119
FF_pow 122
FFX_degfact 126
FF_var 140
FFM_inv 147
FF_minpoly 154
FFX_ispower 168
FFX_preimagerel 168
FF_issquareall 189
FF_log 196
fflog 196
FFM_FFC_wrap 210
FF_ispower 210
FFM_wrap 308
FF_f 371
FF_primroot 406
ffprimroot 406
FFX_factor 441
raw_to_FFX_fact 448
Z_FF_div 462
FqM_to_FpXQM 476
FFX_rem 574
FF_gen 770
FFX_preimage 966
FqV_to_FpXQV 970
FFX_preimage_i 1029
FF_Q_add 1337
FqM_to_FFM 1715
FF_ellorder 1764
FF_map 1785
FF_sqrtn 2212
FFX_sqr 2499
FFX_zero 2643
FFX_gcd 2744
FF_Z_Z_muldiv 3234
FqC_to_FpXQC 3436
ffgen 3469
FqC_to_FFC 3731
FFM_mul 4494
FFM_FFM_wrap 4662
raw_to_FFM 4844
FF_ellweilpairing 4998
FF_zero 6108
FF_sqrt 7161
Tp_to_FF 8225
p_to_FF 9779
FFM_to_raw 9968
FF_inv 14096
FF_ellgens 18116
to_FFE_vec 18116
FF_to_FpXQ 18973
FF_ellgroup 26117
FF_equal1 26201
FF_elltwist 27188
FF_1 27895
FFC_to_raw 44289
FF_q 81921
FF_neg_i 85064
FFX_roots 103670
FF_ellcard 103697
FFX_mul 105477
FFX_wrap2 108816
raw_to_FFX 111010
FF_ellinit 121428
raw_to_FFC 124397
Fq_to_FF 143738
FF_to_FpXQ_i 172802
ffrandom 184493
FF_ellrandom 245977
FF_equal 256033
to_FFE 266511
FFX_to_raw 326209
FF_mod 416171
Z_to_raw 431312
FF_to_F2xq 549927
FF_to_Flxq 603026
rawFq_to_FF 670965
FF_Z_add 1365428
Rg_to_raw 2222940
FF_neg 2299202
FF_div 2464024
FF_sqr 2971446
mkFF_i 3122079
FF_p_i 3153540
_mkFF_i 3350881
FF_mul2n 3843732
FF_Z_mul 3946799
FF_sub 7934937
FF_equal0 11511007
FF_mul 25760666
FF_add 33688964
_checkFF 69848787
FF_samechar 73637724
FF_samefield 73637724
_mkFF 84524421
_initFF 84760146
_getFF 86040217

Generated by: LCOV version 2.0-1