The skip height values, used by CBlockIndex::BuildSkip() and GetSkipHeight are not tested and not well documented. (noticed while reviewing #33515, recently merged).
The motivation is to document the skip value computation through a test.
The first commit adds a test for the properties of the distribution of skip values, namely that they have non-uniform distribution: most values are small but there are some large ones as well.
The second commit adds low-level tests to the GetSkipHeight() internal method. The tests are low level, thus of limited value, and the commit also touches the non-test code minimally (to make the method accessible). Therefore this commit has lower priority.