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 - Zp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30733-eb2d773d38) Lines: 734 873 84.1 %
Date: 2026-03-03 09:24:12 Functions: 69 80 86.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
ZpM_ZpC_gauss 0
ZpM_invlift 0
ZpXQX_ZpXQXQ_liftroot 0
ZpXQX_liftroots 0
ZpXQ_sqrt 0
Zq_sqrtnlift 0
_ZpM_eval 0
_ZpM_invd 0
gen_ZpM_Dixon 0
gen_ZpM_Newton 0
to_ZX 0
polhensellift 28
ZqX_ZqXQ_liftroot 35
polteichmuller 35
ZpXQX_liftroots_full 56
ZpXQX_roots 56
ZpXQM_prodFrobenius 77
ZpX_liftroots 139
ZqX_liftroot 154
ZpX_Frobenius 168
ZpXQX_liftroot 231
ZpXQX_liftroot_vald 231
ZpXQX_digits 420
Fp_pow2n 476
mul2n 616
sqr2n 749
ZpXQ_sqrtnlift 1155
ZpX_ZpXQ_liftroot 1596
bezout_lift_fact 1736
_sqrtn_eval 1806
_sqrtn_invd 1806
_can_lin 3654
F3x_frobeniuslift 3717
ZqX_roots 6265
ZpX_liftroot 6397
BezoutPropagate 7441
_can_invd 7476
_can_iter 7476
_can5_lin 9037
_can_invl 11130
Flx_Teichmuller 13909
_can5_invd 20531
_can5_iter 20531
ZpXQ_log 20998
ZpXQ_log_to_ath 20998
_can5_invl 29568
ZpXQ_div 31584
ZpX_ZpXQ_liftroot_ea 33569
ZpXQX_liftfact 34699
_can5_sqr 41167
_can5_mul 41363
ZqX_liftfact 46571
_shift 61894
ZpX_roots 96352
ZpX_liftroots_full 96491
FqV_roots_from_deg1 96547
Zp_exp 107880
Zp_div 107882
ZpXQX_divrem 131005
Zp_sqrtlift 151431
ZpXQ_inv 165249
ZpXQ_invlift 186247
Zp_log 196232
BuildTree 198890
MultiLift 198921
gen_ZpX_Dixon 199115
ZpX_liftfact 246341
gen_ZpX_Newton 251049
Zp_sqrtnlift 260550
_inv_invd 482719
_inv_eval 482720
ZpXQ_HenselLift 503609
ZpXQ_RecTreeLift 1139609
Zp_sqrt 1267980
Zp_inv 1342721
Zp_invlift 1342721
Zp_divlift 1450603
ZpX_HenselLift 1596843
ZpX_RecTreeLift 3940817
quadratic_prec_mask 4662575

Generated by: LCOV version 1.16