forked from Imagelibrary/littlefs
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user