Added fuzz test attribute

This acts as a marker to indicate a fuzz test. It should reference a
define, usually SEED, that can be randomized to get interesting test
permutations.

This is currently unused, but could lead to some interesting uses such
as time-based fuzz testing. It's also just useful for inspecting the
tests (make test-list).
This commit is contained in:
Christopher Haster
2024-05-28 12:44:44 -05:00
parent 3fb58b6623
commit 9c9a409524
14 changed files with 122 additions and 33 deletions
+11 -7
View File
@@ -859,9 +859,10 @@ static void summary(void) {
char perm_buf[64]; char perm_buf[64];
sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total); sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total);
char flag_buf[64]; char flag_buf[64];
sprintf(flag_buf, "%s%s%s", sprintf(flag_buf, "%s%s%s%s",
(flags & TEST_REENTRANT) ? "r" : "",
(flags & TEST_INTERNAL) ? "i" : "", (flags & TEST_INTERNAL) ? "i" : "",
(flags & TEST_REENTRANT) ? "r" : "",
(flags & TEST_FUZZ) ? "f" : "",
(!flags) ? "-" : ""); (!flags) ? "-" : "");
printf("%-23s %7s %7zu %7zu %15s\n", printf("%-23s %7s %7zu %7zu %15s\n",
"TOTAL", "TOTAL",
@@ -918,9 +919,10 @@ static void list_suites(void) {
char perm_buf[64]; char perm_buf[64];
sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total); sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total);
char flag_buf[64]; char flag_buf[64];
sprintf(flag_buf, "%s%s%s", sprintf(flag_buf, "%s%s%s%s",
(test_suites[i]->flags & TEST_REENTRANT) ? "r" : "",
(test_suites[i]->flags & TEST_INTERNAL) ? "i" : "", (test_suites[i]->flags & TEST_INTERNAL) ? "i" : "",
(test_suites[i]->flags & TEST_REENTRANT) ? "r" : "",
(test_suites[i]->flags & TEST_FUZZ) ? "f" : "",
(!test_suites[i]->flags) ? "-" : ""); (!test_suites[i]->flags) ? "-" : "");
printf("%-*s %7s %7zu %15s\n", printf("%-*s %7s %7zu %15s\n",
name_width, name_width,
@@ -971,11 +973,13 @@ static void list_cases(void) {
char perm_buf[64]; char perm_buf[64];
sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total); sprintf(perm_buf, "%zu/%zu", perms.filtered, perms.total);
char flag_buf[64]; char flag_buf[64];
sprintf(flag_buf, "%s%s%s", sprintf(flag_buf, "%s%s%s%s",
(test_suites[i]->cases[j].flags & TEST_REENTRANT)
? "r" : "",
(test_suites[i]->cases[j].flags & TEST_INTERNAL) (test_suites[i]->cases[j].flags & TEST_INTERNAL)
? "i" : "", ? "i" : "",
(test_suites[i]->cases[j].flags & TEST_REENTRANT)
? "r" : "",
(test_suites[i]->cases[j].flags & TEST_FUZZ)
? "f" : "",
(!test_suites[i]->cases[j].flags) (!test_suites[i]->cases[j].flags)
? "-" : ""); ? "-" : "");
printf("%-*s %7s %15s\n", printf("%-*s %7s %15s\n",
+1
View File
@@ -35,6 +35,7 @@ struct lfs_config;
enum test_flags { enum test_flags {
TEST_INTERNAL = 0x1, TEST_INTERNAL = 0x1,
TEST_REENTRANT = 0x2, TEST_REENTRANT = 0x2,
TEST_FUZZ = 0x4,
}; };
typedef uint8_t test_flags_t; typedef uint8_t test_flags_t;
+10 -2
View File
@@ -59,10 +59,13 @@ class TestCase:
self.code_lineno = config.pop('code_lineno', None) self.code_lineno = config.pop('code_lineno', None)
self.in_ = config.pop('in', self.in_ = config.pop('in',
config.pop('suite_in', None)) config.pop('suite_in', None))
self.fuzz_ = config.pop('fuzz',
config.pop('suite_fuzz', None))
self.internal = bool(self.in_) self.internal = bool(self.in_)
self.reentrant = config.pop('reentrant', self.reentrant = config.pop('reentrant',
config.pop('suite_reentrant', False)) config.pop('suite_reentrant', False))
self.fuzz = bool(self.fuzz_)
# figure out defines and build possible permutations # figure out defines and build possible permutations
self.defines = set() self.defines = set()
@@ -207,6 +210,7 @@ class TestSuite:
if not case_linenos or l < case_linenos[0][0]), if not case_linenos or l < case_linenos[0][0]),
default=None) default=None)
self.in_ = config.pop('in', None) self.in_ = config.pop('in', None)
self.fuzz_ = config.pop('fuzz', None)
self.after = config.pop('after', []) self.after = config.pop('after', [])
if not isinstance(self.after, list): if not isinstance(self.after, list):
@@ -226,6 +230,7 @@ class TestSuite:
'suite_defines': defines, 'suite_defines': defines,
'suite_in': self.in_, 'suite_in': self.in_,
'suite_reentrant': reentrant, 'suite_reentrant': reentrant,
'suite_fuzz': self.fuzz_,
**case}, **case},
args=args)) args=args))
@@ -239,6 +244,7 @@ class TestSuite:
# combine other per-case things # combine other per-case things
self.internal = any(case.internal for case in self.cases) self.internal = any(case.internal for case in self.cases)
self.reentrant = any(case.reentrant for case in self.cases) self.reentrant = any(case.reentrant for case in self.cases)
self.fuzz = any(case.fuzz for case in self.cases)
for k in config.keys(): for k in config.keys():
print('%swarning:%s in %s, found unused key %r' % ( print('%swarning:%s in %s, found unused key %r' % (
@@ -464,7 +470,8 @@ def compile(test_paths, **args):
f.writeln(4*' '+'.flags = %s,' f.writeln(4*' '+'.flags = %s,'
% (' | '.join(filter(None, [ % (' | '.join(filter(None, [
'TEST_INTERNAL' if suite.internal else None, 'TEST_INTERNAL' if suite.internal else None,
'TEST_REENTRANT' if suite.reentrant else None])) 'TEST_REENTRANT' if suite.reentrant else None,
'TEST_FUZZ' if suite.fuzz else None]))
or 0)) or 0))
# create suite defines # create suite defines
if suite.defines: if suite.defines:
@@ -484,7 +491,8 @@ def compile(test_paths, **args):
f.writeln(12*' '+'.flags = %s,' f.writeln(12*' '+'.flags = %s,'
% (' | '.join(filter(None, [ % (' | '.join(filter(None, [
'TEST_INTERNAL' if case.internal else None, 'TEST_INTERNAL' if case.internal else None,
'TEST_REENTRANT' if case.reentrant else None])) 'TEST_REENTRANT' if case.reentrant else None,
'TEST_FUZZ' if case.fuzz else None]))
or 0)) or 0))
# create case defines # create case defines
if case.defines: if case.defines:
+21 -6
View File
@@ -16,9 +16,10 @@ defines.BADBLOCK_BEHAVIOR = [
# 'LFS_EMUBD_BADBLOCK_ERASENOOP', # 'LFS_EMUBD_BADBLOCK_ERASENOOP',
] ]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans # maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)' defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
// test all possible bad blocks // test all possible bad blocks
@@ -122,9 +123,10 @@ defines.BADBLOCK_BEHAVIOR = [
] ]
defines.MIRROR = [false, true] defines.MIRROR = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans # maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)' defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
@@ -225,9 +227,10 @@ defines.BADBLOCK_BEHAVIOR = [
] ]
defines.MIRROR = [false, true] defines.MIRROR = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans # maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)' defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
@@ -333,6 +336,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
# do more ops than dirs to encourage rename collisions # do more ops than dirs to encourage rename collisions
defines.OPS = '2*N' defines.OPS = '2*N'
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
code = ''' code = '''
// test all possible bad blocks // test all possible bad blocks
for (lfs_size_t i = 2; for (lfs_size_t i = 2;
@@ -463,6 +467,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
# do more ops than dirs to encourage rename collisions # do more ops than dirs to encourage rename collisions
defines.OPS = '2*N' defines.OPS = '2*N'
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
for (lfs_size_t i = 0; i < BLOCK_COUNT/2; i++) { for (lfs_size_t i = 0; i < BLOCK_COUNT/2; i++) {
@@ -594,6 +599,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
# do more ops than dirs to encourage rename collisions # do more ops than dirs to encourage rename collisions
defines.OPS = '2*N' defines.OPS = '2*N'
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
for (lfs_size_t i = 0; i < BLOCK_COUNT/2; i++) { for (lfs_size_t i = 0; i < BLOCK_COUNT/2; i++) {
@@ -735,6 +741,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test all possible bad blocks // test all possible bad blocks
@@ -894,6 +901,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
@@ -1054,6 +1062,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
@@ -1203,7 +1212,6 @@ defines.BADBLOCK_BEHAVIOR = [
# 'LFS_EMUBD_BADBLOCK_ERASENOOP', # 'LFS_EMUBD_BADBLOCK_ERASENOOP',
] ]
defines.N = 20 defines.N = 20
defines.SEED = 42
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -1220,6 +1228,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1376,7 +1386,6 @@ defines.BADBLOCK_BEHAVIOR = [
] ]
defines.MIRROR = [false, true] defines.MIRROR = [false, true]
defines.N = 20 defines.N = 20
defines.SEED = 42
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -1393,6 +1402,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1550,7 +1561,6 @@ defines.BADBLOCK_BEHAVIOR = [
] ]
defines.MIRROR = [false, true] defines.MIRROR = [false, true]
defines.N = 20 defines.N = 20
defines.SEED = 42
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -1567,6 +1577,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1736,6 +1748,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test all possible bad blocks // test all possible bad blocks
@@ -2177,6 +2190,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
@@ -2617,6 +2631,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// test a large region of bad blocks // test a large region of bad blocks
+15
View File
@@ -398,6 +398,7 @@ code = '''
[cases.test_btree_push_fuzz] [cases.test_btree_push_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -547,6 +548,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5 defines.W = 5
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -913,6 +915,7 @@ code = '''
[cases.test_btree_update_fuzz] [cases.test_btree_update_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -1071,6 +1074,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5 defines.W = 5
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -1664,6 +1668,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.REMAINING = [64, 2, 1, 0] defines.REMAINING = [64, 2, 1, 0]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = 'N > REMAINING' if = 'N > REMAINING'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
@@ -1857,6 +1862,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5 defines.W = 5
defines.REMAINING = [64, 2, 1, 0] defines.REMAINING = [64, 2, 1, 0]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = 'N > REMAINING' if = 'N > REMAINING'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
@@ -2066,6 +2072,7 @@ code = '''
[cases.test_btree_split_fuzz] [cases.test_btree_split_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2214,6 +2221,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5 defines.W = 5
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2669,6 +2677,7 @@ code = '''
[cases.test_btree_general_fuzz] [cases.test_btree_general_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2774,6 +2783,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.W = 5 defines.W = 5
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -3324,6 +3334,7 @@ code = '''
[cases.test_btree_find_fuzz] [cases.test_btree_find_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -3511,6 +3522,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5 defines.W = 5
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -3666,6 +3678,7 @@ code = '''
[cases.test_btree_find_general_fuzz] [cases.test_btree_find_general_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -3822,6 +3835,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.W = 5 defines.W = 5
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -4148,6 +4162,7 @@ code = '''
[cases.test_btree_traversal_fuzz] [cases.test_btree_traversal_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
+4
View File
@@ -1341,6 +1341,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N' defines.OPS = '2*N'
defines.PARENT = [false, true] defines.PARENT = [false, true]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time # limit powerloss testing due to time
if = '!TEST_PLS || N <= 8' if = '!TEST_PLS || N <= 8'
reentrant = true reentrant = true
@@ -4128,6 +4129,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N' defines.OPS = '2*N'
defines.PARENT = [false, true] defines.PARENT = [false, true]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time # limit powerloss testing due to time
if = '!TEST_PLS || N <= 8' if = '!TEST_PLS || N <= 8'
reentrant = true reentrant = true
@@ -6639,6 +6641,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N' defines.OPS = '2*N'
defines.PARENT = [false, true] defines.PARENT = [false, true]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time # limit powerloss testing due to time
if = '!TEST_PLS || N <= 8' if = '!TEST_PLS || N <= 8'
reentrant = true reentrant = true
@@ -6790,6 +6793,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N' defines.OPS = '2*N'
defines.PARENT = [false, true] defines.PARENT = [false, true]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time # limit powerloss testing due to time
if = '!TEST_PLS || N <= 8' if = '!TEST_PLS || N <= 8'
reentrant = true reentrant = true
+4
View File
@@ -25,6 +25,7 @@ defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4 defines.BLOCK_RECYCLES = 4
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
code = ''' code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the // run our test twice, once with 1/2 the storage, once with 2/2 the
// storage, and compare how many operations we were able to perform // storage, and compare how many operations we were able to perform
@@ -223,6 +224,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the // run our test twice, once with 1/2 the storage, once with 2/2 the
@@ -484,6 +486,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the // run our test twice, once with 1/2 the storage, once with 2/2 the
@@ -887,6 +890,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 42 defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the // run our test twice, once with 1/2 the storage, once with 2/2 the
+5
View File
@@ -792,6 +792,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -1154,6 +1155,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2270,6 +2272,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2466,6 +2469,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2686,6 +2690,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
reentrant = true reentrant = true
code = ''' code = '''
+2
View File
@@ -6662,6 +6662,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -7000,6 +7001,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(20)' defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
+24 -12
View File
@@ -534,7 +534,6 @@ code = '''
[cases.test_fsync_rrrr_fuzz] [cases.test_fsync_rrrr_fuzz]
defines.R = 4 defines.R = 4
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -545,6 +544,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -687,7 +688,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -698,6 +698,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -873,7 +875,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -884,6 +885,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -1066,7 +1069,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1077,6 +1079,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -1279,7 +1283,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1290,6 +1293,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -1391,7 +1396,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40 defines.N = 40
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1402,6 +1406,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -1525,7 +1531,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40 defines.N = 40
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1536,6 +1541,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -2426,7 +2433,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -2437,6 +2443,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -2619,7 +2627,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -2630,6 +2637,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -2827,7 +2836,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20 defines.N = 20
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -2838,6 +2846,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -2944,7 +2954,6 @@ defines.RW = 4
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40 defines.N = 40
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -2955,6 +2964,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -3093,7 +3104,6 @@ defines.RW = 4
# FLUSH=1 => flush via lfsr_file_flush # FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH # FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2] defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40 defines.N = 40
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -3104,6 +3114,8 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.CHUNK = '(SIZE+16-1) / 16' defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
+12 -6
View File
@@ -1524,7 +1524,6 @@ code = '''
# fuzz testing # fuzz testing
[cases.test_fwrite_fuzz_aligned] [cases.test_fwrite_fuzz_aligned]
defines.N = 20 defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -1540,6 +1539,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1666,7 +1667,6 @@ code = '''
# fuzz testing # fuzz testing
[cases.test_fwrite_fuzz_unaligned] [cases.test_fwrite_fuzz_unaligned]
defines.N = 20 defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -1683,6 +1683,8 @@ defines.CHUNK = [32, 8]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1816,7 +1818,6 @@ code = '''
# more seek testing # more seek testing
[cases.test_fwrite_r_seek] [cases.test_fwrite_r_seek]
defines.N = 20 defines.N = 20
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END'] defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1828,6 +1829,8 @@ defines.SIZE = [
] ]
# chunk is more an upper limit here # chunk is more an upper limit here
defines.CHUNK = [32, 8] defines.CHUNK = [32, 8]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -1894,7 +1897,6 @@ code = '''
# different seek methods # different seek methods
[cases.test_fwrite_w_seek] [cases.test_fwrite_w_seek]
defines.N = 10 defines.N = 10
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END'] defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -1911,6 +1913,8 @@ defines.CHUNK = [32, 8]
# INIT=2 => truncate to size # INIT=2 => truncate to size
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -2042,7 +2046,6 @@ code = '''
# the above was just warmup, here's the real seek test # the above was just warmup, here's the real seek test
[cases.test_fwrite_rw_seek] [cases.test_fwrite_rw_seek]
defines.N = 10 defines.N = 10
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END'] defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
@@ -2059,6 +2062,8 @@ defines.CHUNK = [32, 8]
# INIT=2 => truncate to size # INIT=2 => truncate to size
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
@@ -2322,7 +2327,6 @@ code = '''
# heavy fuzz test with rw seeks, truncate, and fruncate # heavy fuzz test with rw seeks, truncate, and fruncate
[cases.test_fwrite_rwtf_fuzz] [cases.test_fwrite_rwtf_fuzz]
defines.N = 20 defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [ defines.SIZE = [
'FBUFFER_SIZE/2', 'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE', '2*FBUFFER_SIZE',
@@ -2339,6 +2343,8 @@ defines.CHUNK = [32, 8]
defines.INIT = [0, 1, 2] defines.INIT = [0, 1, 2]
defines.SYNC = [false, true] defines.SYNC = [false, true]
defines.REMOUNT = [false, true] defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [ if = [
'CHUNK <= SIZE', 'CHUNK <= SIZE',
# this just saves testing time # this just saves testing time
+4
View File
@@ -472,6 +472,7 @@ code = '''
defines.N = [5, 10, 20, 40, 80, 160] defines.N = [5, 10, 20, 40, 80, 160]
defines.FORCE_COMPACTION = [false, true] defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -1003,6 +1004,7 @@ code = '''
defines.N = [5, 10, 20, 40, 80, 160] defines.N = [5, 10, 20, 40, 80, 160]
defines.FORCE_COMPACTION = [false, true] defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -2078,6 +2080,7 @@ defines.N = [5, 10, 20, 40]
defines.FORCE_COMPACTION = [false, true] defines.FORCE_COMPACTION = [false, true]
defines.BLOCK_RECYCLES = [4, 1, 0] defines.BLOCK_RECYCLES = [4, 1, 0]
defines.SEED = 'range(500)' defines.SEED = 'range(500)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -3770,6 +3773,7 @@ defines.N = [5, 10, 20, 40, 80, 160]
defines.VALIDATE = [false, true] defines.VALIDATE = [false, true]
defines.FORCE_COMPACTION = [false, true] defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)' defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c' in = 'lfs.c'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
+4
View File
@@ -3998,6 +3998,7 @@ code = '''
[cases.test_rbyd_fuzz_append_removes] [cases.test_rbyd_fuzz_append_removes]
defines.N = 'range(1, 33)' defines.N = 'range(1, 33)'
defines.SEED = 'range(1000)' defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now # large progs take too long for now
if = 'PROG_SIZE < 512' if = 'PROG_SIZE < 512'
in = 'lfs.c' in = 'lfs.c'
@@ -11818,6 +11819,7 @@ code = '''
[cases.test_rbyd_fuzz_create_deletes] [cases.test_rbyd_fuzz_create_deletes]
defines.N = 'range(1, 33)' defines.N = 'range(1, 33)'
defines.SEED = 'range(1000)' defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now # large progs take too long for now
if = 'PROG_SIZE < 512' if = 'PROG_SIZE < 512'
in = 'lfs.c' in = 'lfs.c'
@@ -14954,6 +14956,7 @@ code = '''
defines.N = 'range(1, 33)' defines.N = 'range(1, 33)'
defines.M = 3 defines.M = 3
defines.SEED = 'range(1000)' defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now # large progs take too long for now
if = 'PROG_SIZE < 512' if = 'PROG_SIZE < 512'
in = 'lfs.c' in = 'lfs.c'
@@ -15114,6 +15117,7 @@ code = '''
defines.N = 'range(1, 33)' defines.N = 'range(1, 33)'
defines.W = 5 defines.W = 5
defines.SEED = 'range(1000)' defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now # large progs take too long for now
if = 'PROG_SIZE < 512' if = 'PROG_SIZE < 512'
in = 'lfs.c' in = 'lfs.c'
+5
View File
@@ -16,6 +16,7 @@ defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256] defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = 1024 defines.OPS = 1024
defines.SEED = 'range(10)' defines.SEED = 'range(10)'
fuzz = 'SEED'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
lfsr_format(&lfs, CFG) => 0; lfsr_format(&lfs, CFG) => 0;
@@ -175,6 +176,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(10)' defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -387,6 +389,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(10)' defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -726,6 +729,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(10)' defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = ''' code = '''
lfs_t lfs; lfs_t lfs;
@@ -1150,6 +1154,7 @@ defines.SIZE = [
'4*BLOCK_SIZE', '4*BLOCK_SIZE',
] ]
defines.SEED = 'range(10)' defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16' if = '(SIZE*N)/BLOCK_SIZE <= 16'
reentrant = true reentrant = true
code = ''' code = '''