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
+21 -6
View File
@@ -16,9 +16,10 @@ defines.BADBLOCK_BEHAVIOR = [
# 'LFS_EMUBD_BADBLOCK_ERASENOOP',
]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c'
code = '''
// test all possible bad blocks
@@ -122,9 +123,10 @@ defines.BADBLOCK_BEHAVIOR = [
]
defines.MIRROR = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c'
code = '''
// test a large region of bad blocks
@@ -225,9 +227,10 @@ defines.BADBLOCK_BEHAVIOR = [
]
defines.MIRROR = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 42
# maximize lookahead buffer to avoid alloc scans
defines.LOOKAHEAD_SIZE = 'lfs_alignup(BLOCK_COUNT / 8, 8)'
defines.SEED = 42
fuzz = 'SEED'
in = 'lfs.c'
code = '''
// 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
defines.OPS = '2*N'
defines.SEED = 42
fuzz = 'SEED'
code = '''
// test all possible bad blocks
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
defines.OPS = '2*N'
defines.SEED = 42
fuzz = 'SEED'
code = '''
// test a large region of bad blocks
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
defines.OPS = '2*N'
defines.SEED = 42
fuzz = 'SEED'
code = '''
// test a large region of bad blocks
for (lfs_size_t i = 0; i < BLOCK_COUNT/2; i++) {
@@ -735,6 +741,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test all possible bad blocks
@@ -894,6 +901,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test a large region of bad blocks
@@ -1054,6 +1062,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test a large region of bad blocks
@@ -1203,7 +1212,6 @@ defines.BADBLOCK_BEHAVIOR = [
# 'LFS_EMUBD_BADBLOCK_ERASENOOP',
]
defines.N = 20
defines.SEED = 42
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -1220,6 +1228,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1376,7 +1386,6 @@ defines.BADBLOCK_BEHAVIOR = [
]
defines.MIRROR = [false, true]
defines.N = 20
defines.SEED = 42
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -1393,6 +1402,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1550,7 +1561,6 @@ defines.BADBLOCK_BEHAVIOR = [
]
defines.MIRROR = [false, true]
defines.N = 20
defines.SEED = 42
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -1567,6 +1577,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 42
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1736,6 +1748,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test all possible bad blocks
@@ -2177,6 +2190,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test a large region of bad blocks
@@ -2617,6 +2631,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// test a large region of bad blocks
+15
View File
@@ -398,6 +398,7 @@ code = '''
[cases.test_btree_push_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -547,6 +548,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -913,6 +915,7 @@ code = '''
[cases.test_btree_update_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -1071,6 +1074,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -1664,6 +1668,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.REMAINING = [64, 2, 1, 0]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = 'N > REMAINING'
in = 'lfs.c'
code = '''
@@ -1857,6 +1862,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5
defines.REMAINING = [64, 2, 1, 0]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = 'N > REMAINING'
in = 'lfs.c'
code = '''
@@ -2066,6 +2072,7 @@ code = '''
[cases.test_btree_split_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -2214,6 +2221,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -2669,6 +2677,7 @@ code = '''
[cases.test_btree_general_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -2774,6 +2783,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.W = 5
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -3324,6 +3334,7 @@ code = '''
[cases.test_btree_find_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -3511,6 +3522,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.W = 5
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -3666,6 +3678,7 @@ code = '''
[cases.test_btree_find_general_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -3822,6 +3835,7 @@ code = '''
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
defines.W = 5
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -4148,6 +4162,7 @@ code = '''
[cases.test_btree_traversal_fuzz]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
defines.SEED = 'range(20)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
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.PARENT = [false, true]
defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time
if = '!TEST_PLS || N <= 8'
reentrant = true
@@ -4128,6 +4129,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N'
defines.PARENT = [false, true]
defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time
if = '!TEST_PLS || N <= 8'
reentrant = true
@@ -6639,6 +6641,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N'
defines.PARENT = [false, true]
defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time
if = '!TEST_PLS || N <= 8'
reentrant = true
@@ -6790,6 +6793,7 @@ defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = '2*N'
defines.PARENT = [false, true]
defines.SEED = 'range(20)'
fuzz = 'SEED'
# limit powerloss testing due to time
if = '!TEST_PLS || N <= 8'
reentrant = true
+4
View File
@@ -25,6 +25,7 @@ defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.SEED = 42
fuzz = 'SEED'
code = '''
// 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
@@ -223,6 +224,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the
@@ -484,6 +486,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// run our test twice, once with 1/2 the storage, once with 2/2 the
@@ -887,6 +890,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 42
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
// 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',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -1154,6 +1155,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -2270,6 +2272,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -2466,6 +2469,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -2686,6 +2690,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
reentrant = true
code = '''
+2
View File
@@ -6662,6 +6662,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -7000,6 +7001,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(20)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
+24 -12
View File
@@ -534,7 +534,6 @@ code = '''
[cases.test_fsync_rrrr_fuzz]
defines.R = 4
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -545,6 +544,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -687,7 +688,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -698,6 +698,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -873,7 +875,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -884,6 +885,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -1066,7 +1069,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1077,6 +1079,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -1279,7 +1283,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1290,6 +1293,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -1391,7 +1396,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1402,6 +1406,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -1525,7 +1531,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1536,6 +1541,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -2426,7 +2433,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -2437,6 +2443,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -2619,7 +2627,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -2630,6 +2637,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -2827,7 +2836,6 @@ defines.SYNC = [0, 1, 2]
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 20
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -2838,6 +2846,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -2944,7 +2954,6 @@ defines.RW = 4
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -2955,6 +2964,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -3093,7 +3104,6 @@ defines.RW = 4
# FLUSH=1 => flush via lfsr_file_flush
# FLUSH=2 => flush via LFS_O_FLUSH
defines.FLUSH = [0, 1, 2]
defines.SEED = 'range(20)'
defines.N = 40
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -3104,6 +3114,8 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.CHUNK = '(SIZE+16-1) / 16'
defines.SEED = 'range(20)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
+12 -6
View File
@@ -1524,7 +1524,6 @@ code = '''
# fuzz testing
[cases.test_fwrite_fuzz_aligned]
defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -1540,6 +1539,8 @@ defines.CHUNK = [32, 8, 1]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1666,7 +1667,6 @@ code = '''
# fuzz testing
[cases.test_fwrite_fuzz_unaligned]
defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -1683,6 +1683,8 @@ defines.CHUNK = [32, 8]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1816,7 +1818,6 @@ code = '''
# more seek testing
[cases.test_fwrite_r_seek]
defines.N = 20
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1828,6 +1829,8 @@ defines.SIZE = [
]
# chunk is more an upper limit here
defines.CHUNK = [32, 8]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -1894,7 +1897,6 @@ code = '''
# different seek methods
[cases.test_fwrite_w_seek]
defines.N = 10
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -1911,6 +1913,8 @@ defines.CHUNK = [32, 8]
# INIT=2 => truncate to size
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -2042,7 +2046,6 @@ code = '''
# the above was just warmup, here's the real seek test
[cases.test_fwrite_rw_seek]
defines.N = 10
defines.SEED = 'range(10)'
defines.WHENCE = ['LFS_SEEK_SET', 'LFS_SEEK_CUR', 'LFS_SEEK_END']
defines.SIZE = [
'FBUFFER_SIZE/2',
@@ -2059,6 +2062,8 @@ defines.CHUNK = [32, 8]
# INIT=2 => truncate to size
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
@@ -2322,7 +2327,6 @@ code = '''
# heavy fuzz test with rw seeks, truncate, and fruncate
[cases.test_fwrite_rwtf_fuzz]
defines.N = 20
defines.SEED = 'range(10)'
defines.SIZE = [
'FBUFFER_SIZE/2',
'2*FBUFFER_SIZE',
@@ -2339,6 +2343,8 @@ defines.CHUNK = [32, 8]
defines.INIT = [0, 1, 2]
defines.SYNC = [false, true]
defines.REMOUNT = [false, true]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = [
'CHUNK <= SIZE',
# this just saves testing time
+4
View File
@@ -472,6 +472,7 @@ code = '''
defines.N = [5, 10, 20, 40, 80, 160]
defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -1003,6 +1004,7 @@ code = '''
defines.N = [5, 10, 20, 40, 80, 160]
defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -2078,6 +2080,7 @@ defines.N = [5, 10, 20, 40]
defines.FORCE_COMPACTION = [false, true]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.SEED = 'range(500)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
@@ -3770,6 +3773,7 @@ defines.N = [5, 10, 20, 40, 80, 160]
defines.VALIDATE = [false, true]
defines.FORCE_COMPACTION = [false, true]
defines.SEED = 'range(100)'
fuzz = 'SEED'
in = 'lfs.c'
code = '''
lfs_t lfs;
+4
View File
@@ -3998,6 +3998,7 @@ code = '''
[cases.test_rbyd_fuzz_append_removes]
defines.N = 'range(1, 33)'
defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now
if = 'PROG_SIZE < 512'
in = 'lfs.c'
@@ -11818,6 +11819,7 @@ code = '''
[cases.test_rbyd_fuzz_create_deletes]
defines.N = 'range(1, 33)'
defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now
if = 'PROG_SIZE < 512'
in = 'lfs.c'
@@ -14954,6 +14956,7 @@ code = '''
defines.N = 'range(1, 33)'
defines.M = 3
defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now
if = 'PROG_SIZE < 512'
in = 'lfs.c'
@@ -15114,6 +15117,7 @@ code = '''
defines.N = 'range(1, 33)'
defines.W = 5
defines.SEED = 'range(1000)'
fuzz = 'SEED'
# large progs take too long for now
if = 'PROG_SIZE < 512'
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.OPS = 1024
defines.SEED = 'range(10)'
fuzz = 'SEED'
code = '''
lfs_t lfs;
lfsr_format(&lfs, CFG) => 0;
@@ -175,6 +176,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -387,6 +389,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -726,6 +729,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
code = '''
lfs_t lfs;
@@ -1150,6 +1154,7 @@ defines.SIZE = [
'4*BLOCK_SIZE',
]
defines.SEED = 'range(10)'
fuzz = 'SEED'
if = '(SIZE*N)/BLOCK_SIZE <= 16'
reentrant = true
code = '''