3a470f9d73
The main issue with the btree tests cross-geometry is the number of ways large btrees can run out of memory without garbage collection. - Large progs => A lot of padding on non-compacting commits - Small blocks => Deeper trees and more compacts Rather than figure out every precondition, I've just added code that ignores out-of-space errors. As a plus this is now also testing that errors don't corrupt the btree being modified. Bugs found: - Thanks to lazy merges, it's possible for an in-btree rbyd weight to equal the total btree weight even when it's not the child of the root of the btree. The behavior is the same (collapse all degenerate parent), but the assert that we were the root's child is incorrect. - Thanks again to lazy merges, it's possible to merge siblings where one of the blocks has no entries. Attempting to reintroduce the split name in this case can lead to LFS_ERR_NOENT issues. Fortunately we can simply skip the reintroduction of the split name in this case. Also added more asserts for LFS_ERR_RANGE in lfsr_btree_commit. This is still a rather fragile part of the algorithm so the asserts here help identify when the pending attribute size is the problem.