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 - mpqs.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30702-bddb8d6928) Lines: 695 841 82.6 %
Date: 2026-02-23 02:23:56 Functions: 34 38 89.5 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
mpqs_status 0
rel_add_ei 0
rel_sub_ei 0
split_relp 0
toolarge 6
mpqs_class_init 20
mpqs_class_rels 240
rels_to_quad 240
mpqs_find_k 2624
mpqs 2630
mpqs_FB_ctor 2644
mpqs_create_FB 2644
mpqs_locate_A_range 2644
mpqs_poly_ctor 2644
mpqs_set_parameters 2644
mpqs_set_sieve_threshold 2644
mpqs_sieve_array_ctor 2644
mpqs_solve_linear_system 2698
rels_to_F2Ms 2698
combine_large_primes 5484
zv_is_even 5484
split 5734
mpqs_increment 6871
rels_to_pairs 7475
decimal_len 7898
mpqs_si_choose_primes 9561
rel_Y 10968
rel_p 10968
mpqs_eval_cand 71726
mpqs_eval_sieve 76554
mpqs_self_init 76554
mpqs_sieve 76554
rel_to_ei 265809
frel_add 278400
mpqs_sieve_p 380489
mpqs_add_factor 4326832
mpqs_sieve_p2 17110534
mpqs_sieve_p1 23625319

Generated by: LCOV version 1.16