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:
@@ -926,10 +926,12 @@ defines.WRAPAROUND = 3
|
|||||||
defines.PREERASE = [false, true]
|
defines.PREERASE = [false, true]
|
||||||
defines.GC_FLAGS = '''
|
defines.GC_FLAGS = '''
|
||||||
LFS3_GC_LOOKAHEAD
|
LFS3_GC_LOOKAHEAD
|
||||||
| ((PREERASE) ? LFS3_GC_PREERASE : 0)
|
| ((PREERASE) ? LFS3_IFDEF_PREERASE(LFS3_GC_PREERASE, -1) : 0)
|
||||||
'''
|
'''
|
||||||
defines.GC_STEPS = -1
|
defines.GC_STEPS = -1
|
||||||
defines.GC_PREERASE_COUNT = ['0', '4', 'COUNT/2', 'COUNT-4', '-1']
|
defines.GC_PREERASE_COUNT = ['0', '4', 'COUNT/2', 'COUNT-4', '-1']
|
||||||
|
# test with a number of different erase values
|
||||||
|
defines.ERASE_VALUE = [0xff, 0x00, -1]
|
||||||
ifdef = 'LFS3_GC'
|
ifdef = 'LFS3_GC'
|
||||||
if = [
|
if = [
|
||||||
'COUNT >= 3',
|
'COUNT >= 3',
|
||||||
@@ -937,6 +939,7 @@ if = [
|
|||||||
'LFS3_IFDEF_PREERASE(true, !PREERASE)',
|
'LFS3_IFDEF_PREERASE(true, !PREERASE)',
|
||||||
# this is just to reduce useless permutations
|
# this is just to reduce useless permutations
|
||||||
'PREERASE || GC_PREERASE_COUNT == 0',
|
'PREERASE || GC_PREERASE_COUNT == 0',
|
||||||
|
'PREERASE || ERASE_VALUE == 0xff',
|
||||||
]
|
]
|
||||||
code = '''
|
code = '''
|
||||||
// test various block counts
|
// test various block counts
|
||||||
|
|||||||
@@ -535,6 +535,8 @@ defines.SIZE = [
|
|||||||
'2*BLOCK_SIZE',
|
'2*BLOCK_SIZE',
|
||||||
'8*BLOCK_SIZE',
|
'8*BLOCK_SIZE',
|
||||||
]
|
]
|
||||||
|
# test with a number of different erase values
|
||||||
|
defines.ERASE_VALUE = [0xff, 0x00, -1]
|
||||||
if = 'GBMAP'
|
if = 'GBMAP'
|
||||||
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
||||||
code = '''
|
code = '''
|
||||||
@@ -660,6 +662,8 @@ defines.GC_FLAGS = '''
|
|||||||
'''
|
'''
|
||||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||||
defines.SIZE = 'BLOCK_SIZE'
|
defines.SIZE = 'BLOCK_SIZE'
|
||||||
|
# test with a number of different erase values
|
||||||
|
defines.ERASE_VALUE = [0xff, 0x00, -1]
|
||||||
if = 'GBMAP'
|
if = 'GBMAP'
|
||||||
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
ifdef = ['LFS3_GC', 'LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
||||||
code = '''
|
code = '''
|
||||||
|
|||||||
@@ -336,6 +336,8 @@ defines.SIZE = [
|
|||||||
# REMOUNT=1 => remount with preerase
|
# REMOUNT=1 => remount with preerase
|
||||||
# REMOUNT=2 => remount without preerase
|
# REMOUNT=2 => remount without preerase
|
||||||
defines.REMOUNT = [0, 1, 2]
|
defines.REMOUNT = [0, 1, 2]
|
||||||
|
# test with a number of different erase values
|
||||||
|
defines.ERASE_VALUE = [0xff, 0x00, -1]
|
||||||
ifdef = ['LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
ifdef = ['LFS3_GBMAP', 'LFS3_REVPERTURB', 'LFS3_PREERASE']
|
||||||
if = 'GBMAP'
|
if = 'GBMAP'
|
||||||
code = '''
|
code = '''
|
||||||
|
|||||||
Reference in New Issue
Block a user