Skip to content

Commit 5ef0d48

Browse files
committed
Merge bitcoin/bitcoin#30605: Cluster linearization: separate tests from tests-of-tests
d7fca5c clusterlin: add big comment explaning the relation between tests (Pieter Wuille) b64e61d clusterlin: abstract try-permutations into ExhaustiveLinearize function (Pieter Wuille) 1fa55a6 clusterlin tests: verify that chunks are minimal (Pieter Wuille) da23ece clusterlin tests: support non-empty ReadTopologicalSubset() (Pieter Wuille) 94f3e17 clusterlin tests: compare with fuzz-provided linearizations (Pieter Wuille) 5f92ebe clusterlin tests: compare with fuzz-provided topological sets (Pieter Wuille) 6e37824 clusterlin tests: optimize clusterlin_simple_linearize (Pieter Wuille) 98c1c88 clusterlin tests: separate testing of SimpleLinearize and Linearize (Pieter Wuille) 10e90f7 clusterlin tests: make SimpleCandidateFinder always find connected (Pieter Wuille) a38c389 clusterlin tests: separate testing of Search- and SimpleCandidateFinder (Pieter Wuille) 77a432e clusterlin tests: count SimpleCandidateFinder iterations better (Pieter Wuille) Pull request description: 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 of `SearchCandidateFinder` by comparing against both `SimpleCandidateFinder` and `ExhaustiveCandidateFinder` (which is even more simple than `SimpleCandidateFinder`). If `SimpleCandidateFinder` works correctly, then this comparison with `ExhaustiveCandidateFinder` is redundant. If it isn't, we ought to find that in a test specific to `SimpleCandidateFinder` rather than as a side-effect of testing `SearchCandidateFinder`. Split this functionality out into a new `clusterlin_simple_finder`. * `clusterlin_linearize`: establishes the correctness of `Linearize` by comparing against both `SimpleLinearize` and literally every valid linearization for the cluster. Again, if `SimpleLinearize` works correctly, then this comparison with all valid linearizations is redundant, and if it isn't we should find it in a test for `SimpleLinearize`. Do so by splitting off that functionality into `clusterlin_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). ACKs for top commit: marcofleon: Re ACK d7fca5c ismaelsadeeq: re-ACK d7fca5c monlovesmango: ACK d7fca5c Tree-SHA512: 33cb76bd9b9547a5f3ee231fa452e928f064ad03af98e3d9e64246eb972f2b026c13e7367257ccdac1ae57982ee8ef98c907684588ecbb4bc4c82cbec160b3e8
2 parents b80ead8 + d7fca5c commit 5ef0d48

File tree

1 file changed

+304
-72
lines changed

1 file changed

+304
-72
lines changed

0 commit comments

Comments
 (0)