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 - polclass.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 825 846 97.5 %
Date: 2026-02-23 02:23:56 Functions: 72 73 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
logfac 0
evec_inverse 145
evec_equal 165
orient_pcp 217
evec_compose 370
polclass_psum 432
verify_2path 480
evec_inverse_o 505
distinct_inverses 705
next_prime_evec 875
index_to_evec 997
polclass_small_disc 1285
modinv_inverted_involution 1499
modinv_negated_involution 1499
famatsmall_divexact 1531
polclass 1738
check_modinv 2198
verify_edge 2612
modinv_units 3076
evec_n_to_m 3350
evec_orders 3350
classgp_pcp_check_generators 3365
classgp_make_pcp 3822
height_margin 3822
modinv_has_sign_ambiguity 3822
pcp_get_fau 3822
quadnegclassnou 3822
select_classpoly_prime_pool 3822
select_classpoly_primes 3822
upper_bound_on_classpoly_coeffs 3822
evec_clear 3860
evec_ri_mutate 4063
next_generator 4207
evec_order 4237
adjust_orientation 4862
oriented_n_action 4862
pcp_get_n 5079
pcp_get_o 5079
pcp_get_orient_reps 5079
pcp_get_r 5079
polclass0 5107
pcp_get_m 5291
pcp_get_orient_p 5291
pcp_get_orient_q 5291
vecsmall_isin_skip 5473
pcp_get_L 7138
pcp_get_L0 7138
evec_to_index 7954
adjust_signs 8354
pcp_get_k 8901
evec_ri 9281
evec_copy 9464
Flv_powsum_pre 11510
evec_reduce 15808
pcp_get_u 111244
polclass_roots_modp 111244
polclass_worker 111244
find_jinv 112207
best_torsion_constraint 112243
hasse_bounds 112243
find_j_inv_with_given_trace 112325
oneroot_of_classpoly 112325
pcp_get_D 118888
pcp_get_inv 119105
test_curve_order 134578
norm_eqn_set 142625
factor_uv 146687
hclassno_wrapper 150509
pcp_get_D0 150509
pcp_get_h 150509
torsion_constraint 336729
random_FleV 680609
primecmp 984231

Generated by: LCOV version 1.16