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 30734-f1f26dedcb) Lines: 912 954 95.6 %
Date: 2026-03-06 09:24:29 Functions: 61 64 95.3 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
BD_deg1 0
Rg_is_QXk 0
ZXk_divexact 0
next2pow 14
LLL_cmbf 126
chk_factors 140
QXk_gcd 189
polcyclofactors 315
chk_factors_get 350
BD_odd 406
QX_factor 805
poliscycloprod 1029
LLL_check_progress 1547
myconcat 2310
BD 2359
QX_gcd 19227
_gcd 19416
invphi 19737
ZX_factor 37324
fact_from_DDF 38122
ZX_factor_i 38129
cmbf 50778
cmbf_precs 50778
combine_factors 50778
Beauzamy_bound 61279
Mignotte_bound 61279
factor_bound 61279
poliscyclo 99199
ZX_is_irred 102582
root_bound 111064
ZX_gcd_chinese 117344
ZX_gcd_filter 123499
ZX_DDF 153355
shifteval 184865
ZX_is_squarefree 198462
ZX_DDF_max 206247
ZX_squff 320398
ZXk_gcd 1650183
rec 1663476
DDF_roots 1876628
nfrootsQ 1876634
pick_prime 2082875
ZXkX_ZXk_divexact 2499495
ZXkX_ZXk_divexact_s 2515187
ZXk_divexact_i 2523620
ZXk_divides_i 2729793
centeri2n 3134158
ZXkX_ZXk_divides_s 3163143
ZX_radical 3167753
ZXk_content_shallow 3341393
ZX_gcd_slice 3359001
ZX_gcd_worker 3359001
ZX_gcd_Flx 3370649
dividesii 3375763
ZXk_center2n 4782462
ZXk_renormalize 4811447
ZXk_divides 6056731
ZX_divides 6558749
ZX_divides_i 6588254
ZXk_divexact_s 7517211
ZXk_gcd_i 8452874
ZX_gcd 9557764
ZXk_divides_s 9817442
ZX_gcd_all 13374226

Generated by: LCOV version 1.16