Part of the cluster mempool project: #30289
The current cluster linearization fuzz tests contain two tests which combine testing of production code with testing of the test code itself:
clusterlin_search_finder
: establishes the correctness ofSearchCandidateFinder
by comparing against bothSimpleCandidateFinder
andExhaustiveCandidateFinder
(which is even more simple thanSimpleCandidateFinder
). IfSimpleCandidateFinder
works correctly, then this comparison withExhaustiveCandidateFinder
is redundant. If it isn’t, we ought to find that in a test specific toSimpleCandidateFinder
rather than as a side-effect of testingSearchCandidateFinder
. Split this functionality out into a newclusterlin_simple_finder
.clusterlin_linearize
: establishes the correctness ofLinearize
by comparing against bothSimpleLinearize
and literally every valid linearization for the cluster. Again, ifSimpleLinearize
works correctly, then this comparison with all valid linearizations is redundant, and if it isn’t we should find it in a test forSimpleLinearize
. Do so by splitting off that functionality intoclusterlin_simple_linearize
.
After that, a few general improvements to the affected tests are made (comparing with linearizations and subsets read from the fuzz input, plus a performance improvement).