Added test_wl and aggressive orphan/zombie fuzz tests
test_wl is intended to test wear-leveling, although right now that just involves heavy-duty fuzz tests with extremely low block_recycles. What may be more interesting is the addition of aggressive orphan/zombie tests: - test_forphans_orphanzombie_fuzz - test_forphans_orphanzombiedir_fuzz - test_wl_orphanzombie_fuzz - test_wl_orphanzombiedir_fuzz These tests mix random file/dir operations while keeping random file handles open, creating a complex environment for hitting weird orphan/ zombie corner cases. And they did find a bug! We were asserting on LFS_ERR_RANGE when migrating shrubs/sprouts during lfsr_mdir_commit__. The tricky thing about lfsr_mdir_commit__ is that we need to expect LFS_ERR_RANGE from any append operations, since this is what trigger mdir compaction. This is especially tricky since LFS_ERR_RANGE is a hard error in most other functions. Easy fix. lfsr_mdir_commit__ contains no more LFS_ERR_RANGE asserts. With these tests hopefully that's the last time we see this mistake.
This commit is contained in:
@@ -970,7 +970,6 @@ code = '''
|
||||
|
||||
[cases.test_btree_update_fuzz]
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
|
||||
defines.SAMPLES = 10
|
||||
defines.SEED = 'range(20)'
|
||||
in = 'lfs.c'
|
||||
code = '''
|
||||
|
||||
Reference in New Issue
Block a user