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 - bb_group.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.16.1 lcov report (development 28676-df828f1c94) Lines: 533 568 93.8 %
Date: 2023-08-26 07:54:43 Functions: 36 36 100.0 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
gen_Pollard_log 49
gen_pow_init 119
gen_select_order 980
gen_ellgens 2716
gen_powu_fold 5110
gen_factored_order 5467
gen_gener 15883
ellgroup_d2 41195
gen_ellgroup 41356
gen_pow_table 63739
gen_powu 177634
sliding_window_pow 193795
gen_Shanks_sqrtn 250576
gen_Shanks_sqrtl 263467
gen_lgener 283211
gen_pow_fold 544316
gen_pow_fold_i 677465
gen_Shanks_init 707947
gen_Shanks 713323
gen_powu_fold_i 1319914
get_arith_Z 1357597
gen_Shanks_log 1509166
gen_order 3782535
gen_PH_log 4669509
gen_plog 6109994
int_block 7802070
sliding_window_powu 9318573
get_arith_ZZM 10792678
gen_pow 10808537
gen_powers 27751368
gen_pow_i 36824876
producttree_scheme 57078832
iter_rho 59171814
gen_product 60563224
leftright_binary_powu 99155971
gen_powu_i 110757001

Generated by: LCOV version 1.14