Aligned block_recycles in tests to powers-of-2

littlefs does this internally anyways. The original intention was to
make sure non-powers-of-2 don't break, but we don't really validate what
these end up aligned to. And the intentional mismatch risks confusion
when debugging.

If it's worth testing non-powers-of-2, it should be an explicit test.
This commit is contained in:
Christopher Haster
2024-05-28 01:05:48 -05:00
parent 94761c14b6
commit 76d3c49b5c
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -2076,7 +2076,7 @@ code = '''
[cases.test_mtree_relocate_fuzz]
defines.N = [5, 10, 20, 40]
defines.FORCE_COMPACTION = [false, true]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.SEED = 'range(500)'
in = 'lfs.c'
code = '''
+5 -5
View File
@@ -12,7 +12,7 @@ after = [
# dirs + relocations may create problems for gstate
[cases.test_relocations_dir_fuzz]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = 1024
defines.REMOUNT = [false, true]
@@ -160,7 +160,7 @@ code = '''
# files + relocations may create problems for shrubs
[cases.test_relocations_file_fuzz]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
defines.SIZE = [
@@ -371,7 +371,7 @@ code = '''
# open files + relocations may create problems for orphans/zombies
[cases.test_relocations_orphanzombie_fuzz]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
defines.SIZE = [
@@ -710,7 +710,7 @@ code = '''
# open files + dirs + relocations can cause so many problems it's not worth
# listing them
[cases.test_relocations_orphanzombiedir_fuzz]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
defines.SIZE = [
@@ -1134,7 +1134,7 @@ code = '''
# wrong.
#
[cases.test_relocations_pl_fuzz]
defines.BLOCK_RECYCLES = [5, 1, 0]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 256
defines.SIZE = [