preerase: Expanded preerase testing to include non-0xff erase values

I just noticed we weren't testing preerase with non-0xff ecksums at all!

Added to relevant tests:

  # test with a number of different erase values
  defines.ERASE_VALUE = [0xff, 0x00, -1]

The most important non-0xff value being -1 (noop erases), which should
usually result in fragmented ecksums.

Note this was copied from test_rbyd, where we do something similar to
test non-0xff ecksums in rbyd logs.
This commit is contained in:
Christopher Haster
2026-01-06 10:51:23 -06:00
parent 340b786e6b
commit c07a69c2a6
3 changed files with 10 additions and 1 deletions
+4
View File
@@ -535,6 +535,8 @@ defines.SIZE = [
'2*BLOCK_SIZE',
'8*BLOCK_SIZE',
]
# test with a number of different erase values
defines.ERASE_VALUE = [0xff, 0x00, -1]
if = 'GBMAP'
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
code = '''
@@ -660,6 +662,8 @@ defines.GC_FLAGS = '''
'''
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
defines.SIZE = 'BLOCK_SIZE'
# test with a number of different erase values
defines.ERASE_VALUE = [0xff, 0x00, -1]
if = 'GBMAP'
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
code = '''