Added a bit of fuzz testing over mtree splits
This isn't the greatest coverage as we don't have a verifiable simulation. Simulating the splitting-bucket-tree that is the mtree is tricky. So right now this mostly just checks there's no internal assert failures and if we have the expected number of entries afterwards.
This commit is contained in:
@@ -4523,12 +4523,7 @@ static inline int lfsr_mtree_isinlined(lfs_t *lfs) {
|
||||
}
|
||||
|
||||
static inline lfs_ssize_t lfsr_mtree_weight(lfs_t *lfs) {
|
||||
// inlined mdir?
|
||||
if (lfsr_mtree_isinlined(lfs)) {
|
||||
return lfs->mroot.rbyd.weight;
|
||||
} else {
|
||||
return lfsr_btree_weight(&lfs->mtree);
|
||||
}
|
||||
return lfsr_btree_weight(&lfs->mtree);
|
||||
}
|
||||
|
||||
static int lfsr_mtree_lookup(lfs_t *lfs, lfs_ssize_t mid, lfsr_mdir_t *mdir_) {
|
||||
|
||||
Reference in New Issue
Block a user