Added high-level every-block error tests to test_ck
These are basically the same as our test_badblock tests, except we accept LFS_ERR_CORRUPT. This lets us test more checking modes that may not enable recovery (ckreads, ckfetches, etc). Well, in theory, at least. The lack of rollback protection gets in the way of both ckreads and ckfetches, so we're currently only testing ckprogs, which isn't much of an improvement. At least this gets the scaffolding in place... This also inverts the test_ck -> test_badblocks dependency. Now that these both have exhaustive tests, we might as well limit test_badblocks to simple erroring erases/progs and let test_ck check the ck checks.
This commit is contained in:
+21
-12
@@ -92,7 +92,7 @@ static lfs_emubd_block_t *lfs_emubd_mutblock(
|
||||
|
||||
|
||||
// prng used for some emulation things
|
||||
static uint32_t lfs_emubd_prng(uint32_t *state) {
|
||||
static uint32_t lfs_emubd_prng_(uint32_t *state) {
|
||||
// A simple xorshift32 generator, easily reproducible. Keep in mind
|
||||
// determinism is much more important than actual randomness here.
|
||||
uint32_t x = *state;
|
||||
@@ -331,7 +331,7 @@ int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
|
||||
lfs_size_t bit = b->bad_bit & 0x7fffffff;
|
||||
if (bit/8 >= off
|
||||
&& bit/8 < off+size
|
||||
&& (lfs_emubd_prng(&bd->prng) & 1)) {
|
||||
&& (lfs_emubd_prng_(&bd->prng) & 1)) {
|
||||
((uint8_t*)buffer)[(bit/8) - off] ^= 1 << (bit%8);
|
||||
}
|
||||
}
|
||||
@@ -401,7 +401,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
|
||||
bd->blocks[block] = b;
|
||||
|
||||
// flip bit
|
||||
lfs_size_t bit = lfs_emubd_prng(&bd->prng)
|
||||
lfs_size_t bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->prog_size*8);
|
||||
b->data[off + (bit/8)] ^= 1 << (bit%8);
|
||||
|
||||
@@ -441,7 +441,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
|
||||
memcpy(&b->data[off], buffer, size);
|
||||
|
||||
// flip bit
|
||||
lfs_size_t bit = lfs_emubd_prng(&bd->prng)
|
||||
lfs_size_t bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->prog_size*8);
|
||||
b->data[off + (bit/8)] ^= 1 << (bit%8);
|
||||
|
||||
@@ -519,7 +519,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
|
||||
|
||||
// choose a new bad bit unless overridden
|
||||
if (!(0x80000000 & b->bad_bit)) {
|
||||
b->bad_bit = lfs_emubd_prng(&bd->prng)
|
||||
b->bad_bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->block_size*8);
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
||||
bd->blocks[block] = b;
|
||||
|
||||
// flip bit
|
||||
lfs_size_t bit = lfs_emubd_prng(&bd->prng)
|
||||
lfs_size_t bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->block_size*8);
|
||||
b->data[(bit/8)] ^= 1 << (bit%8);
|
||||
|
||||
@@ -739,7 +739,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
||||
}
|
||||
|
||||
// flip bit
|
||||
lfs_size_t bit = lfs_emubd_prng(&bd->prng)
|
||||
lfs_size_t bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->block_size*8);
|
||||
b->data[(bit/8)] ^= 1 << (bit%8);
|
||||
|
||||
@@ -817,7 +817,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
||||
|
||||
// choose a new bad bit unless overridden
|
||||
if (!(0x80000000 & b->bad_bit)) {
|
||||
b->bad_bit = lfs_emubd_prng(&bd->prng)
|
||||
b->bad_bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->block_size*8);
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
|
||||
|| bd->cfg->badblock_behavior
|
||||
== LFS_EMUBD_BADBLOCK_READFLIP) {
|
||||
if (!(0x80000000 & b->bad_bit)) {
|
||||
b->bad_bit = lfs_emubd_prng(&bd->prng)
|
||||
b->bad_bit = lfs_emubd_prng_(&bd->prng)
|
||||
% (cfg->block_size*8);
|
||||
}
|
||||
}
|
||||
@@ -988,15 +988,24 @@ int lfs_emubd_sync(const struct lfs_config *cfg) {
|
||||
|
||||
/// Additional extended API for driving test features ///
|
||||
|
||||
int lfs_emubd_seed(const struct lfs_config *cfg, uint32_t seed) {
|
||||
void lfs_emubd_seed(const struct lfs_config *cfg, uint32_t seed) {
|
||||
LFS_EMUBD_TRACE("lfs_emubd_seed(%p, 0x%08"PRIx32")",
|
||||
(void*)cfg, seed);
|
||||
lfs_emubd_t *bd = cfg->context;
|
||||
|
||||
bd->prng = seed;
|
||||
|
||||
LFS_EMUBD_TRACE("lfs_emubd_seed -> %d", 0);
|
||||
return 0;
|
||||
LFS_EMUBD_TRACE("lfs_emubd_seed -> _");
|
||||
}
|
||||
|
||||
uint32_t lfs_emubd_prng(const struct lfs_config *cfg) {
|
||||
LFS_EMUBD_TRACE("lfs_emubd_prng(%p)", (void*)cfg);
|
||||
lfs_emubd_t *bd = cfg->context;
|
||||
|
||||
uint32_t x = lfs_emubd_prng_(&bd->prng);
|
||||
|
||||
LFS_EMUBD_TRACE("lfs_emubd_prng -> 0x%08"PRIx32, x);
|
||||
return x;
|
||||
}
|
||||
|
||||
lfs_emubd_sio_t lfs_emubd_readed(const struct lfs_config *cfg) {
|
||||
|
||||
+4
-1
@@ -191,7 +191,10 @@ int lfs_emubd_sync(const struct lfs_config *cfg);
|
||||
/// Additional extended API for driving test features ///
|
||||
|
||||
// Set the current prng state
|
||||
int lfs_emubd_seed(const struct lfs_config *cfg, uint32_t seed);
|
||||
void lfs_emubd_seed(const struct lfs_config *cfg, uint32_t seed);
|
||||
|
||||
// Get a pseudo-random number from emubd's internal prng
|
||||
uint32_t lfs_emubd_prng(const struct lfs_config *cfg);
|
||||
|
||||
// Get total amount of bytes read
|
||||
lfs_emubd_sio_t lfs_emubd_readed(const struct lfs_config *cfg);
|
||||
|
||||
+38
-63
@@ -7,18 +7,17 @@ after = [
|
||||
'test_traversal',
|
||||
'test_gc',
|
||||
'test_mount',
|
||||
'test_ck',
|
||||
'test_compat',
|
||||
]
|
||||
|
||||
|
||||
## Single badblock tests
|
||||
## Single-block badblock tests
|
||||
#
|
||||
# first test with every possible single badblock
|
||||
|
||||
# B-tree's ridiculous branching factor is great for performance, but it makes
|
||||
# them a bit of a pain to test, here we test them explicitly
|
||||
[cases.test_badblocks_single_btree_many]
|
||||
[cases.test_badblocks_every_btree_many]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -26,7 +25,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -43,9 +41,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test creating a btree
|
||||
lfs_t lfs;
|
||||
@@ -129,8 +127,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# with dirs
|
||||
[cases.test_badblocks_single_dir_many]
|
||||
# badblocks with dirs
|
||||
[cases.test_badblocks_every_dir_many]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -138,7 +136,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -150,9 +147,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test creating directories
|
||||
lfs_t lfs;
|
||||
@@ -245,8 +242,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# fuzz dirs
|
||||
[cases.test_badblocks_single_dir_fuzz]
|
||||
# badblocks with fuzz dirs
|
||||
[cases.test_badblocks_every_dir_fuzz]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -254,7 +251,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -269,9 +265,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test fuzz with dirs
|
||||
lfs_t lfs;
|
||||
@@ -432,8 +428,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# with files
|
||||
[cases.test_badblocks_single_file_many]
|
||||
# badblocks with files
|
||||
[cases.test_badblocks_every_file_many]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -441,7 +437,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -465,9 +460,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test creating files
|
||||
lfs_t lfs;
|
||||
@@ -544,8 +539,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# fuzz files
|
||||
[cases.test_badblocks_single_file_fuzz]
|
||||
# badblocks with fuzz files
|
||||
[cases.test_badblocks_every_file_fuzz]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -553,7 +548,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -580,9 +574,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test fuzz with files
|
||||
lfs_t lfs;
|
||||
@@ -795,8 +789,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# with more complex file writes
|
||||
[cases.test_badblocks_single_fwrite_fuzz]
|
||||
# badblocks with more complex file writes
|
||||
[cases.test_badblocks_every_fwrite_fuzz]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -804,7 +798,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -838,9 +831,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test with complex file writes
|
||||
lfs_t lfs;
|
||||
@@ -966,8 +959,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# with orphans, zombies, etc
|
||||
[cases.test_badblocks_single_orphanzombie_fuzz]
|
||||
# badblocks with orphans, zombies, etc
|
||||
[cases.test_badblocks_every_orphanzombie_fuzz]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -975,7 +968,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -1002,9 +994,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test with orphans, zombies, etc
|
||||
lfs_t lfs;
|
||||
@@ -1338,8 +1330,8 @@ code = '''
|
||||
}
|
||||
'''
|
||||
|
||||
# with orphans, zombies, dirs, etc
|
||||
[cases.test_badblocks_single_orphanzombiedir_fuzz]
|
||||
# badblocks with orphans, zombies, dirs, etc
|
||||
[cases.test_badblocks_every_orphanzombiedir_fuzz]
|
||||
defines.BADBLOCK = -1
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -1347,7 +1339,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -1374,9 +1365,9 @@ code = '''
|
||||
i < ((BADBLOCK == -1) ? BLOCK_COUNT : 1);
|
||||
i++) {
|
||||
lfs_size_t badblock = (BADBLOCK == -1) ? i : BADBLOCK;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
// mark our badblock as bad
|
||||
lfs_emubd_markbad(CFG, badblock) => 0;
|
||||
printf("--- badblock: 0x%x ---\n", badblock);
|
||||
|
||||
// test with orphans, zombies, dirs, etc
|
||||
lfs_t lfs;
|
||||
@@ -1806,7 +1797,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -1907,7 +1897,7 @@ code = '''
|
||||
lfs_deinit(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with dirs
|
||||
# badblocks with dirs
|
||||
[cases.test_badblocks_region_dir_many]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -1915,7 +1905,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -2024,7 +2013,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# fuzz dirs
|
||||
# badblocks with fuzz dirs
|
||||
[cases.test_badblocks_region_dir_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -2032,7 +2021,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -2212,7 +2200,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with files
|
||||
# badblocks with files
|
||||
[cases.test_badblocks_region_file_many]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -2220,7 +2208,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -2325,7 +2312,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# fuzz files
|
||||
# badblocks with fuzz files
|
||||
[cases.test_badblocks_region_file_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -2333,7 +2320,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -2577,7 +2563,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with more complex file writes
|
||||
# badblocks with more complex file writes
|
||||
[cases.test_badblocks_region_fwrite_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -2585,7 +2571,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -2749,7 +2734,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with orphans, zombies, etc
|
||||
# badblocks with orphans, zombies, etc
|
||||
[cases.test_badblocks_region_orphanzombie_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -2757,7 +2742,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -3122,7 +3106,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with orphans, zombies, dirs, etc
|
||||
# badblocks with orphans, zombies, dirs, etc
|
||||
[cases.test_badblocks_region_orphanzombiedir_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -3130,7 +3114,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -3588,7 +3571,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -3689,7 +3671,7 @@ code = '''
|
||||
lfs_deinit(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with dirs
|
||||
# badblocks with dirs
|
||||
[cases.test_badblocks_alternating_dir_many]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -3697,7 +3679,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -3806,7 +3787,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# fuzz dirs
|
||||
# badblocks with fuzz dirs
|
||||
[cases.test_badblocks_alternating_dir_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -3814,7 +3795,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -3994,7 +3974,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with files
|
||||
# badblocks with files
|
||||
[cases.test_badblocks_alternating_file_many]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -4002,7 +3982,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -4107,7 +4086,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# fuzz files
|
||||
# badblocks with fuzz files
|
||||
[cases.test_badblocks_alternating_file_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -4115,7 +4094,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -4359,7 +4337,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with more complex file writes
|
||||
# badblocks with more complex file writes
|
||||
[cases.test_badblocks_alternating_fwrite_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -4367,7 +4345,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -4529,7 +4506,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with orphans, zombies, etc
|
||||
# badblocks with orphans, zombies, etc
|
||||
[cases.test_badblocks_alternating_orphanzombie_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -4537,7 +4514,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
@@ -4902,7 +4878,7 @@ code = '''
|
||||
lfsr_unmount(&lfs) => 0;
|
||||
'''
|
||||
|
||||
# with orphans, zombies, dirs, etc
|
||||
# badblocks with orphans, zombies, dirs, etc
|
||||
[cases.test_badblocks_alternating_orphanzombiedir_fuzz]
|
||||
defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_PROGERROR',
|
||||
@@ -4910,7 +4886,6 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READERROR',
|
||||
'LFS_EMUBD_BADBLOCK_PROGNOOP',
|
||||
'LFS_EMUBD_BADBLOCK_ERASENOOP',
|
||||
'LFS_EMUBD_BADBLOCK_PROGFLIP',
|
||||
]
|
||||
# we need prog checking to detect read errors
|
||||
defines.CKPROGS = 'BADBLOCK_BEHAVIOR >= LFS_EMUBD_BADBLOCK_READERROR'
|
||||
|
||||
+1939
-21
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user