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) Coverage Total Hit
Test: PARI/GP v2.19.0 lcov report (development 31092-e6893b0017) Lines: 95.9 % 952 913
Test Date: 2026-08-05 17:02:52 Functions: 95.3 % 64 61
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
BD 2366
BD_deg1 0
BD_odd 420
Beauzamy_bound 62436
DDF_roots 1878474
LLL_check_progress 1736
LLL_cmbf 161
Mignotte_bound 62436
QX_factor 805
QX_gcd 19367
QXk_gcd 189
Rg_is_QXk 0
ZX_DDF 155291
ZX_DDF_max 210269
ZX_divides 6557260
ZX_divides_i 6587893
ZX_factor 38764
ZX_factor_i 39569
ZX_gcd 10623725
ZX_gcd_Flx 3368483
ZX_gcd_all 14446729
ZX_gcd_chinese 116600
ZX_gcd_filter 122805
ZX_gcd_slice 3356782
ZX_gcd_worker 3356782
ZX_is_irred 103076
ZX_is_squarefree 199469
ZX_radical 3170478
ZX_squff 322318
ZXkX_ZXk_divexact 2527823
ZXkX_ZXk_divexact_s 2570537
ZXkX_ZXk_divides_s 3262477
ZXk_center2n 4909872
ZXk_content_shallow 3444534
ZXk_divexact 0
ZXk_divexact_i 2529108
ZXk_divexact_s 7582948
ZXk_divides 6217701
ZXk_divides_i 2789701
ZXk_divides_s 10118541
ZXk_gcd 1686049
ZXk_gcd_i 8688143
ZXk_renormalize 4958257
_gcd 19556
centeri2n 3214092
chk_factors 140
chk_factors_get 350
cmbf 51744
cmbf_precs 51744
combine_factors 51744
dividesii 3479688
fact_from_DDF 39562
factor_bound 62436
invphi 19659
myconcat 2317
next2pow 14
nfrootsQ 1878474
pick_prime 2088743
polcyclofactors 322
poliscyclo 99218
poliscycloprod 1029
rec 1714007
root_bound 112947
shifteval 186409

Generated by: LCOV version 2.0-1