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 - perm.c (source / functions) Coverage Total Hit
Test: PARI/GP v2.18.1 lcov report (development 31042-0fbe168e69) Lines: 92.2 % 1111 1024
Test Date: 2026-07-23 17:04:59 Functions: 94.1 % 119 112
Legend: Lines:     hit not hit

Function Name Sort by function name Hit count Sort by function hit count
Z_to_perm 5915
_domul 2002
abelian_group 462
all_cyclic_subg 21
conjclasses_repr 4284
cyc_pow 7512
cyc_pow_perm 0
cyclic_subg 651
cyclicgroup 29162
dicyclicgroup 1085
galois_elts_sorted 3899
group_abelianHNF 644
group_abelianSNF 595
group_domain 27391
group_elts 141813
group_export 35
group_export_GAP 21
group_export_MAGMA 14
group_isA4S4 10094
group_isabelian 9723
group_leftcoset 307433
group_order 718571
group_perm_normalize 184758
group_quotient 10269
group_rightcoset 184758
group_set 90727
group_subgroup_is_faithful 4816
group_subgroup_isnormal 336
group_subgroup_kernel_set 4816
group_subgroups 13314
group_to_cc 4305
groupelt_subg_normalize 1218
groupelts_abelian_group 0
groupelts_center 700
groupelts_conj_set 14448
groupelts_conjclasses 4284
groupelts_cyclic_primepow 21
groupelts_cyclic_subgroups 4144
groupelts_exponent 0
groupelts_pow 651
groupelts_quotient 11928
groupelts_residuum 21
groupelts_set 28182
groupelts_solvablesubgroups 21
groupelts_subgroup_isnormal 15435
groupelts_subgroups_raw 21
groupelts_to_group 4151
groupelts_to_regular 21
grp_get_gen 951636
grp_get_ord 1612492
isperm 2667
liftlistsubgroups 65275
liftsubgroup 49350
numtoperm 5915
perm_bracket 75600
perm_commute 572901
perm_cycles 14121
perm_generate 13104
perm_mul_inplace2 21
perm_order 427
perm_orderu 441830
perm_pow 77
perm_powu 19194
perm_relorder 220332
perm_sign 968308
perm_to_GAP 441
perm_to_Z 1680
perm_to_Z_inplace 1701
permcycles 259
permorder 434
permsign 273
permtonum 1708
quo_get_coset 30408
quo_get_gen 142688
quotient_group 10262
quotient_groupelts 1659
quotient_perm 30408
quotient_subgroup_lift 51009
set_derived 21
set_groupelts 1239
set_idx 21
sgcmp 17353
subg_extend 546
subg_get_gen 1764
subg_get_set 12978
subg_to_elts 21
subgroups_tableset 497
tableset_find_index 2002
triv_subg 21
trivialgroup 52612
trivialsubgroups 52570
vec_insert 98084
vec_is1to1 0
vec_isconst 1855
vecperm_extendschreier 0
vecperm_orbits 4893
vecperm_orbits_i 461271
vecsmall_counting_indexsort 12922
vecsmall_counting_sort 1970981
vecsmall_counting_uniq 16129
vecsmall_duplicate 21079
vecsmall_duplicate_sorted 0
vecsmall_indexsort 2488260
vecsmall_indexsortspec 8239255
vecsmall_is1to1 11530
vecsmall_is1to1spec 55450
vecsmall_isconst 17944
vecsmall_sort 56204575
vecsmall_sort_max 51980087
vecsmall_sortspec 379775539
vecsmall_uniq 16488
vecsmall_uniq_sorted 31390
vecvecsmall_indexsort 1281
vecvecsmall_max 0
vecvecsmall_search 22934359
vecvecsmall_sort 21
vecvecsmall_sort_inplace 133
vecvecsmall_sort_shallow 370881
vecvecsmall_sort_uniq 462

Generated by: LCOV version 2.0-1