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 30391-f41a6adeb0) Lines: 825 846 97.5 %
Date: 2025-07-14 09:22:41 Functions: 72 73 98.6 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Flv_powsum_pre 17216
adjust_orientation 6172
adjust_signs 11511
best_torsion_constraint 154564
check_modinv 2821
classgp_make_pcp 5233
classgp_pcp_check_generators 4672
distinct_inverses 987
evec_clear 5407
evec_compose 518
evec_copy 12598
evec_equal 231
evec_inverse 217
evec_inverse_o 707
evec_n_to_m 4651
evec_order 5887
evec_orders 4651
evec_reduce 21460
evec_ri 13042
evec_ri_mutate 5669
evec_to_index 10500
factor_uv 201164
famatsmall_divexact 2359
find_j_inv_with_given_trace 154703
find_jinv 154526
hasse_bounds 154592
hclassno_wrapper 206397
height_margin 5233
index_to_evec 1372
logfac 0
modinv_has_sign_ambiguity 5233
modinv_inverted_involution 2107
modinv_negated_involution 2107
modinv_units 3535
next_generator 5817
next_prime_evec 1225
norm_eqn_set 193764
oneroot_of_classpoly 155003
orient_pcp 280
oriented_n_action 6172
pcp_get_D 163812
pcp_get_D0 206397
pcp_get_L 9989
pcp_get_L0 9989
pcp_get_fau 5233
pcp_get_h 206397
pcp_get_inv 164046
pcp_get_k 11685
pcp_get_m 6725
pcp_get_n 6452
pcp_get_o 6452
pcp_get_orient_p 6725
pcp_get_orient_q 6725
pcp_get_orient_reps 6452
pcp_get_r 6452
pcp_get_u 153361
polclass 2177
polclass0 6703
polclass_psum 595
polclass_roots_modp 153303
polclass_small_disc 1470
polclass_worker 153404
primecmp 1352602
quadnegclassnou 5233
random_FleV 933107
select_classpoly_prime_pool 5233
select_classpoly_primes 5233
test_curve_order 185293
torsion_constraint 462047
upper_bound_on_classpoly_coeffs 5233
vecsmall_isin_skip 7630
verify_2path 672
verify_edge 3656

Generated by: LCOV version 1.16