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 - QX_factor.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 913 954 95.7 %
Date: 2025-11-25 09:20:50 Functions: 61 64 95.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BD 2359
BD_deg1 0
BD_odd 406
Beauzamy_bound 61098
DDF_roots 1876170
LLL_check_progress 1547
LLL_cmbf 126
Mignotte_bound 61098
QX_factor 805
QX_gcd 19073
QXk_gcd 189
Rg_is_QXk 0
ZX_DDF 152202
ZX_DDF_max 204863
ZX_divides 6553208
ZX_divides_i 6582609
ZX_factor 50674
ZX_factor_i 51479
ZX_gcd 10620564
ZX_gcd_Flx 3365653
ZX_gcd_all 14459574
ZX_gcd_chinese 115118
ZX_gcd_filter 121272
ZX_gcd_slice 3354007
ZX_gcd_worker 3354007
ZX_is_irred 101448
ZX_is_squarefree 196409
ZX_radical 3163613
ZX_squff 333748
ZXkX_ZXk_divexact 2528117
ZXkX_ZXk_divexact_s 2571356
ZXkX_ZXk_divides_s 3264990
ZXk_center2n 4910922
ZXk_content_shallow 3445416
ZXk_divexact 0
ZXk_divexact_i 2529297
ZXk_divexact_s 7584530
ZXk_divides 6218618
ZXk_divides_i 2789715
ZXk_divides_s 10123525
ZXk_gcd 1686070
ZXk_gcd_i 8689753
ZXk_renormalize 4961365
_gcd 19262
centeri2n 3214547
chk_factors 140
chk_factors_get 350
cmbf 50605
cmbf_precs 50605
combine_factors 50605
dividesii 3481592
fact_from_DDF 51472
factor_bound 61098
invphi 19433
myconcat 2310
next2pow 14
nfrootsQ 1876173
pick_prime 2081034
polcyclofactors 315
poliscyclo 98138
poliscycloprod 1029
rec 1714462
root_bound 110891
shifteval 184546

Generated by: LCOV version 1.16