From 76d3c49b5cdd7d69b35e9161b220545c673d356d Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 28 May 2024 01:05:48 -0500 Subject: [PATCH] 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. --- tests/test_mtree.toml | 2 +- tests/test_relocations.toml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_mtree.toml b/tests/test_mtree.toml index 390bf095..bb338667 100644 --- a/tests/test_mtree.toml +++ b/tests/test_mtree.toml @@ -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 = ''' diff --git a/tests/test_relocations.toml b/tests/test_relocations.toml index 3c2cefdb..2d29ec59 100644 --- a/tests/test_relocations.toml +++ b/tests/test_relocations.toml @@ -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 = [