Some cleanup items

- Adopted *_IS* naming convention for sign-bit macros.
- Made all struct initializing macros function-like, including the
  *_NULL() macros.
- Renamed ggrm/dgrm -> grm_g/grm_d.
- Renamed lfsr_mroot_commit_ -> lfsr_mroot_commit.
- Renamed LFSR_FILE_BSPROUT -> LFSR_FILE_ISDIRECT.
- Renamed LFSR_BSPROUT_NULL -> LFSR_FILE_BNULL().
- Dropped *_unerase functions for explicitly setting eoff=-1.
This commit is contained in:
Christopher Haster
2023-11-25 22:03:39 -06:00
parent f4af2b407e
commit a89b3e42ba
6 changed files with 318 additions and 330 deletions
+64 -64
View File
@@ -164,7 +164,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with a large attr so the next entry can not fit
uint8_t buffer[SIZE];
@@ -238,7 +238,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create 2 large entries that needs to be uninlined and split
uint8_t buffer[SIZE];
@@ -311,7 +311,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -413,7 +413,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create entries
lfsr_mdir_t mdir;
@@ -505,7 +505,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// at least keep track of the number of entries we expect
lfs_size_t count = 0;
@@ -616,7 +616,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -643,7 +643,7 @@ code = '''
assert(mdir.u.m.weight == 1);
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -685,7 +685,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -715,7 +715,7 @@ code = '''
mdir.u.rbyd.eoff = -1;
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -757,7 +757,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -774,7 +774,7 @@ code = '''
// remove the entry as we compact, forcing the mdir to be dropped
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -816,7 +816,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an mdir that needs to be split
uint8_t buffer[SIZE];
@@ -834,7 +834,7 @@ code = '''
// remove the left entry as we compact, forcing the left
// mdir to be dropped
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 1*lfsr_mweight(&lfs));
@@ -883,7 +883,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an mdir that needs to be split
uint8_t buffer[SIZE];
@@ -901,7 +901,7 @@ code = '''
// remove the right entry as we compact, forcing the right mdir
// to be dropped
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(1, RM, -1, NULL))) => 0;
LFSR_ATTR(1, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 1*lfsr_mweight(&lfs));
@@ -950,7 +950,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an mdir that needs to be split
uint8_t buffer[SIZE];
@@ -967,8 +967,8 @@ code = '''
// remove both entries as we compact, forcing both mdirs to be dropped
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL),
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()),
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -1000,7 +1000,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -1037,7 +1037,7 @@ code = '''
// mdir to be dropped
mdir.mid = 0*lfsr_mweight(&lfs)+0;
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(mdir.mid, RM, -1, NULL))) => 0;
LFSR_ATTR(mdir.mid, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 1*lfsr_mweight(&lfs));
@@ -1095,7 +1095,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -1131,7 +1131,7 @@ code = '''
// remove the right entry as we compact, forcing the right
// mdir to be dropped
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(1, RM, -1, NULL))) => 0;
LFSR_ATTR(1, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 1*lfsr_mweight(&lfs));
@@ -1189,7 +1189,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -1224,8 +1224,8 @@ code = '''
// remove both entries as we compact, forcing both mdirs to be dropped
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL),
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()),
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -1272,7 +1272,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create entries
lfsr_mdir_t mdir;
@@ -1310,7 +1310,7 @@ code = '''
}
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
}
// try looking up each entry
@@ -1378,7 +1378,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
for (lfs_size_t cycle = 0; cycle < CYCLES; cycle++) {
// create entries, note we may have leftovers from the previous cycle
@@ -1437,7 +1437,7 @@ code = '''
}
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
}
// try looking up each entry
@@ -1504,7 +1504,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// at least keep track of the number of entries we expect
lfs_size_t count = 0;
@@ -1553,7 +1553,7 @@ code = '''
// delete
} else {
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(mdir.mid, RM, -1, NULL))) => 0;
LFSR_ATTR(mdir.mid, RM, -1, NULL()))) => 0;
count -= 1;
}
@@ -1641,7 +1641,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with a large attr so the next entry can not fit
uint8_t buffer[SIZE];
@@ -1736,7 +1736,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create 2 large entries that needs to be uninlined and split
uint8_t buffer[SIZE];
@@ -1830,7 +1830,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create 2 large entries that needs to be uninlined and split
uint8_t buffer[SIZE];
@@ -1924,7 +1924,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with an attr
uint8_t buffer[SIZE];
@@ -1983,7 +1983,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with an attr
uint8_t buffer[SIZE];
@@ -2041,7 +2041,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with an attr
uint8_t buffer[SIZE];
@@ -2108,7 +2108,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with a large attr so the next entry can not fit
uint8_t buffer[SIZE];
@@ -2214,7 +2214,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -2327,7 +2327,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -2359,7 +2359,7 @@ code = '''
assert(mdir.u.m.weight == 1);
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(mdir.mid, RM, -1, NULL))) => 0;
LFSR_ATTR(mdir.mid, RM, -1, NULL()))) => 0;
// assert mdir was dropped
assert(lfsr_mtree_weight(&lfs) == 0*lfsr_mweight(&lfs));
@@ -2409,7 +2409,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// force mroot to compact once, so the second compact below will trigger
// a relocation
@@ -2497,7 +2497,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// force mroot to compact once, so the second compact below will trigger
// a relocation
@@ -2587,7 +2587,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// at least keep track of the number of entries we expect
lfs_size_t count = 0;
@@ -2649,7 +2649,7 @@ code = '''
// delete
} else {
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(mdir.mid, RM, -1, NULL))) => 0;
LFSR_ATTR(mdir.mid, RM, -1, NULL()))) => 0;
count -= 1;
}
@@ -2732,7 +2732,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -2782,7 +2782,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -2800,7 +2800,7 @@ code = '''
// try removing our left entry
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// assert that an entry was removed
assert(lfs.mroot.u.m.weight == 1);
@@ -2825,7 +2825,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -2843,7 +2843,7 @@ code = '''
// try removing our left entry
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(1, RM, -1, NULL))) => 0;
LFSR_ATTR(1, RM, -1, NULL()))) => 0;
// assert that an entry was removed
assert(lfs.mroot.u.m.weight == 1);
@@ -2870,7 +2870,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -2950,7 +2950,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -3025,7 +3025,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -3129,7 +3129,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// setup our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -3195,7 +3195,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create an uninlined mdir
uint8_t buffer[SIZE];
@@ -3288,7 +3288,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
//// create a situation where we have 3 mdirs in our tree
@@ -3381,7 +3381,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
//// create a situation where we have 3 mdirs in our tree
@@ -3437,7 +3437,7 @@ code = '''
lfsr_mtree_lookup(&lfs, 1*lfsr_mweight(&lfs)+0, &mdir) => 0;
assert(mdir.u.m.weight == 1);
lfsr_mdir_commit(&lfs, &mdir, LFSR_ATTRS(
LFSR_ATTR(mdir.mid, RM, -1, NULL))) => 0;
LFSR_ATTR(mdir.mid, RM, -1, NULL()))) => 0;
// we should now have 2 mdirs
assert(lfsr_mtree_weight(&lfs) == 2*lfsr_mweight(&lfs));
@@ -3470,7 +3470,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// insert a new entry, this should update our neighbors
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
@@ -3562,7 +3562,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with a large attr so the next entry can not fit
uint8_t buffer[SIZE];
@@ -3687,7 +3687,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create 2 large entries that needs to be uninlined and split
uint8_t buffer[SIZE];
@@ -3816,7 +3816,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// prepare mroot with an attr
uint8_t buffer[SIZE];
@@ -3923,7 +3923,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// create entries
lfsr_mdir_t mdir;
@@ -4065,7 +4065,7 @@ code = '''
lfs_alloc_ack(&lfs);
// remove root bookmark for now
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(0, RM, -1, NULL))) => 0;
LFSR_ATTR(0, RM, -1, NULL()))) => 0;
// at least keep track of the number of entries we expect
lfs_size_t count = 0;