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 30074-db9b3c0519) Lines: 825 846 97.5 %
Date: 2025-03-13 08:38:27 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 174
evec_equal 222
orient_pcp 240
evec_compose 444
polclass_psum 474
verify_2path 576
evec_inverse_o 630
distinct_inverses 858
next_prime_evec 1062
index_to_evec 1188
polclass_small_disc 1278
modinv_inverted_involution 1851
modinv_negated_involution 1851
polclass 1860
famatsmall_divexact 1967
check_modinv 2394
modinv_units 2979
verify_edge 3400
evec_n_to_m 3771
evec_orders 3771
classgp_pcp_check_generators 3789
classgp_make_pcp 4228
height_margin 4228
modinv_has_sign_ambiguity 4228
pcp_get_fau 4228
quadnegclassnou 4228
select_classpoly_prime_pool 4228
select_classpoly_primes 4228
upper_bound_on_classpoly_coeffs 4228
evec_clear 4383
evec_order 4801
next_generator 4909
evec_ri_mutate 4969
adjust_orientation 5283
oriented_n_action 5283
polclass0 5506
pcp_get_n 5523
pcp_get_o 5523
pcp_get_orient_reps 5523
pcp_get_r 5523
pcp_get_m 5757
pcp_get_orient_p 5757
pcp_get_orient_q 5757
vecsmall_isin_skip 6541
pcp_get_L 7983
pcp_get_L0 7983
evec_to_index 9259
adjust_signs 9299
pcp_get_k 9751
evec_copy 10534
evec_ri 11634
Flv_powsum_pre 13700
evec_reduce 18542
pcp_get_u 119321
polclass_roots_modp 119321
polclass_worker 119321
find_jinv 120482
best_torsion_constraint 120532
hasse_bounds 120532
find_j_inv_with_given_trace 120616
oneroot_of_classpoly 120616
pcp_get_D 127777
pcp_get_inv 128017
test_curve_order 143338
norm_eqn_set 152535
factor_uv 159801
hclassno_wrapper 164029
pcp_get_D0 164029
pcp_get_h 164029
torsion_constraint 361596
random_FleV 739842
primecmp 1056593

Generated by: LCOV version 1.16