Changed all dir tests to be reentrant

To help with this, added TEST_PL, which is set to true when powerloss
testing. This way tests can check for stronger conditions (no EEXIST)
when not powerloss testing.

With TEST_PL, there's really no reason every test in t5_dirs shouldn't
be reentrant, and this gives us a huge improvement of test coverage very
cheaply.

---

The increased test coverage caught a bug, which is that gstate wasn't
being consumed properly when mtree uninlining. Humorously, this went
unnoticed because the most common form of mtree uninlining, mdir splitting,
ended up incorrectly consuming the gstate twice, which canceled itself
out since the consume operation is basically just xor.

Also added support for printing dstarts to dbglfs.py, to help debugging.
This commit is contained in:
Christopher Haster
2023-07-18 16:32:49 -05:00
parent 97f867b28d
commit c928ed131f
7 changed files with 270 additions and 175 deletions

View File

@@ -511,7 +511,8 @@ def main(disk, roots=None, *,
btree.addr(), btree.rev, btree.weight))
# look up an id, while keeping track of the search path
def btree_lookup(bid, depth=None):
def btree_lookup(bid, *,
depth=None):
rbyd = btree
rid = bid
depth_ = 1