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 30107-5d3c5ac62a) Lines: 825 846 97.5 %
Date: 2025-04-01 09:20:36 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 16000
adjust_orientation 6511
adjust_signs 11193
best_torsion_constraint 140995
check_modinv 2800
classgp_make_pcp 4868
classgp_pcp_check_generators 4335
distinct_inverses 987
evec_clear 4944
evec_compose 518
evec_copy 12467
evec_equal 231
evec_inverse 175
evec_inverse_o 707
evec_n_to_m 4314
evec_order 5501
evec_orders 4314
evec_reduce 21280
evec_ri 13158
evec_ri_mutate 5620
evec_to_index 10839
factor_uv 188987
famatsmall_divexact 2002
find_j_inv_with_given_trace 141154
find_jinv 140994
hasse_bounds 141056
hclassno_wrapper 193855
height_margin 4868
index_to_evec 1386
logfac 0
modinv_has_sign_ambiguity 4868
modinv_inverted_involution 2174
modinv_negated_involution 2174
modinv_units 3832
next_generator 5536
next_prime_evec 1225
norm_eqn_set 178475
oneroot_of_classpoly 141419
orient_pcp 294
oriented_n_action 6511
pcp_get_D 149516
pcp_get_D0 193855
pcp_get_L 9326
pcp_get_L0 9326
pcp_get_fau 4868
pcp_get_h 193855
pcp_get_inv 149769
pcp_get_k 11673
pcp_get_m 7092
pcp_get_n 6805
pcp_get_o 6805
pcp_get_orient_p 7092
pcp_get_orient_q 7092
pcp_get_orient_reps 6805
pcp_get_r 6805
pcp_get_u 139787
polclass 2177
polclass0 6373
polclass_psum 574
polclass_roots_modp 139724
polclass_small_disc 1505
polclass_worker 139814
primecmp 1241071
quadnegclassnou 4868
random_FleV 867824
select_classpoly_prime_pool 4868
select_classpoly_primes 4868
test_curve_order 168220
torsion_constraint 421418
upper_bound_on_classpoly_coeffs 4868
vecsmall_isin_skip 7634
verify_2path 672
verify_edge 3656

Generated by: LCOV version 1.16