Renamed high-level spam tests to include *_spam_*

These are our current set of general-purpose high-level tests that can
be turned to when needing to test a wide range of filesystem operations.

They were getting a bit hard to keep track of without a consistent
prefix, especially since no individual test suite can actually use all
of them at the same time.

Now, finding these tests is as simple as: ./scripts/test.py -L *_spam_*

I also renamed a couple because their names were starting to get
ridiculous. I mean just look at
test_badblocks_alternating_spam_orphanzombiedir_fuzz...

- *_spam_orphanzombie_fuzz    -> *_spam_oz_fuzz
- *_spam_orphanzombiedir_fuzz -> *_spam_ozd_fuzz
- *_spam_file_pl_fuzz         -> *_spam_f_pl_fuzz
- *_spam_filedir_pl_fuzz      -> *_spam_fd_pl_fuzz

Here are all of the current spam tests and contexts we use them in:

                traversal               badblocks   relocations
                |     gc    ck    grow  |     powerloss   exhaustion
  dir_many      y     y           y     y     y     y
  dir_fuzz      y     y     y     y     y           y     y
  file_many     y     y           y     y     y     y
  file_fuzz     y     y     y     y     y           y     y
  fwrite_fuzz   y     y     y           y                 y
  oz_fuzz       y     y     y     y     y           y     y
  ozd_fuzz      y     y     y     y     y           y     y
  f_pl_fuzz                       y           y     y
  fd_pl_fuzz                      y           y     y
This commit is contained in:
Christopher Haster
2024-08-13 23:29:22 -05:00
parent 4fa2864f30
commit a53151df1f
8 changed files with 52 additions and 52 deletions
+21 -21
View File
@@ -129,7 +129,7 @@ code = '''
'''
# badblocks with dirs
[cases.test_badblocks_every_dir_many]
[cases.test_badblocks_every_spam_dir_many]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -244,7 +244,7 @@ code = '''
'''
# badblocks with fuzz dirs
[cases.test_badblocks_every_dir_fuzz]
[cases.test_badblocks_every_spam_dir_fuzz]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -430,7 +430,7 @@ code = '''
'''
# badblocks with files
[cases.test_badblocks_every_file_many]
[cases.test_badblocks_every_spam_file_many]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -541,7 +541,7 @@ code = '''
'''
# badblocks with fuzz files
[cases.test_badblocks_every_file_fuzz]
[cases.test_badblocks_every_spam_file_fuzz]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -791,7 +791,7 @@ code = '''
'''
# badblocks with more complex file writes
[cases.test_badblocks_every_fwrite_fuzz]
[cases.test_badblocks_every_spam_fwrite_fuzz]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -961,7 +961,7 @@ code = '''
'''
# badblocks with orphans, zombies, etc
[cases.test_badblocks_every_orphanzombie_fuzz]
[cases.test_badblocks_every_spam_oz_fuzz]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -1332,7 +1332,7 @@ code = '''
'''
# badblocks with orphans, zombies, dirs, etc
[cases.test_badblocks_every_orphanzombiedir_fuzz]
[cases.test_badblocks_every_spam_ozd_fuzz]
defines.BADBLOCK = -1
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
@@ -1899,7 +1899,7 @@ code = '''
'''
# badblocks with dirs
[cases.test_badblocks_region_dir_many]
[cases.test_badblocks_region_spam_dir_many]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -2015,7 +2015,7 @@ code = '''
'''
# badblocks with fuzz dirs
[cases.test_badblocks_region_dir_fuzz]
[cases.test_badblocks_region_spam_dir_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -2202,7 +2202,7 @@ code = '''
'''
# badblocks with files
[cases.test_badblocks_region_file_many]
[cases.test_badblocks_region_spam_file_many]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -2314,7 +2314,7 @@ code = '''
'''
# badblocks with fuzz files
[cases.test_badblocks_region_file_fuzz]
[cases.test_badblocks_region_spam_file_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -2565,7 +2565,7 @@ code = '''
'''
# badblocks with more complex file writes
[cases.test_badblocks_region_fwrite_fuzz]
[cases.test_badblocks_region_spam_fwrite_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -2736,7 +2736,7 @@ code = '''
'''
# badblocks with orphans, zombies, etc
[cases.test_badblocks_region_orphanzombie_fuzz]
[cases.test_badblocks_region_spam_oz_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -3108,7 +3108,7 @@ code = '''
'''
# badblocks with orphans, zombies, dirs, etc
[cases.test_badblocks_region_orphanzombiedir_fuzz]
[cases.test_badblocks_region_spam_ozd_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -3673,7 +3673,7 @@ code = '''
'''
# badblocks with dirs
[cases.test_badblocks_alternating_dir_many]
[cases.test_badblocks_alternating_spam_dir_many]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -3789,7 +3789,7 @@ code = '''
'''
# badblocks with fuzz dirs
[cases.test_badblocks_alternating_dir_fuzz]
[cases.test_badblocks_alternating_spam_dir_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -3976,7 +3976,7 @@ code = '''
'''
# badblocks with files
[cases.test_badblocks_alternating_file_many]
[cases.test_badblocks_alternating_spam_file_many]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -4088,7 +4088,7 @@ code = '''
'''
# badblocks with fuzz files
[cases.test_badblocks_alternating_file_fuzz]
[cases.test_badblocks_alternating_spam_file_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -4339,7 +4339,7 @@ code = '''
'''
# badblocks with more complex file writes
[cases.test_badblocks_alternating_fwrite_fuzz]
[cases.test_badblocks_alternating_spam_fwrite_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -4508,7 +4508,7 @@ code = '''
'''
# badblocks with orphans, zombies, etc
[cases.test_badblocks_alternating_orphanzombie_fuzz]
[cases.test_badblocks_alternating_spam_oz_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
@@ -4880,7 +4880,7 @@ code = '''
'''
# badblocks with orphans, zombies, dirs, etc
[cases.test_badblocks_alternating_orphanzombiedir_fuzz]
[cases.test_badblocks_alternating_spam_ozd_fuzz]
defines.BADBLOCK_BEHAVIOR = [
'LFS_EMUBD_BADBLOCK_PROGERROR',
'LFS_EMUBD_BADBLOCK_ERASEERROR',
+2 -2
View File
@@ -2272,7 +2272,7 @@ corrupt_mounted:;
'''
# fuzz errors with orphans, zombies, etc
[cases.test_ck_spam_orphanzombie_fuzz]
[cases.test_ck_spam_oz_fuzz]
defines.BADBLOCK = -1
# TODO enable other methods once rollback protection is in place
# METHOD=0 => ckprogs
@@ -2709,7 +2709,7 @@ corrupt_mounted:;
'''
# fuzz errors with orphans, zombies, dirs, etc
[cases.test_ck_spam_orphanzombiedir_fuzz]
[cases.test_ck_spam_ozd_fuzz]
# TODO enable other methods once rollback protection is in place
# METHOD=0 => ckprogs
# METHOD=1 => ckreads
+5 -5
View File
@@ -21,7 +21,7 @@ after = [
# storage roughly doubles the lifetime of the storage.
# test dir wear-leveling
[cases.test_exhaustion_dir_fuzz]
[cases.test_exhaustion_spam_dir_fuzz]
defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.BADBLOCK_BEHAVIOR = [
@@ -227,7 +227,7 @@ code = '''
'''
# test file wear-leveling
[cases.test_exhaustion_file_fuzz]
[cases.test_exhaustion_spam_file_fuzz]
defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.BADBLOCK_BEHAVIOR = [
@@ -508,7 +508,7 @@ code = '''
'''
# with more complex file writes
[cases.test_exhaustion_fwrite_fuzz]
[cases.test_exhaustion_spam_fwrite_fuzz]
defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.BADBLOCK_BEHAVIOR = [
@@ -695,7 +695,7 @@ code = '''
'''
# with orphans, zombies, etc
[cases.test_exhaustion_orphanzombie_fuzz]
[cases.test_exhaustion_spam_oz_fuzz]
defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.BADBLOCK_BEHAVIOR = [
@@ -1117,7 +1117,7 @@ code = '''
'''
# with orphans, zombies, dirs, etc
[cases.test_exhaustion_orphanzombiedir_fuzz]
[cases.test_exhaustion_spam_ozd_fuzz]
defines.ERASE_CYCLES = 10
defines.BLOCK_RECYCLES = 4
defines.BADBLOCK_BEHAVIOR = [
+2 -2
View File
@@ -2468,7 +2468,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_gc_spam_orphanzombie_fuzz]
[cases.test_gc_spam_oz_fuzz]
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
defines.MKCONSISTENT = [false, true]
defines.LOOKAHEAD = [false, true]
@@ -2824,7 +2824,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_gc_spam_orphanzombiedir_fuzz]
[cases.test_gc_spam_ozd_fuzz]
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
defines.MKCONSISTENT = [false, true]
defines.LOOKAHEAD = [false, true]
+8 -8
View File
@@ -432,7 +432,7 @@ code = '''
# one block. Hopefully this will catch most grow-related bugs.
#
[cases.test_grow_incr_dir_many]
[cases.test_grow_incr_spam_dir_many]
defines.INIT_BLOCK_COUNT = 2
defines.REMOUNT = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
@@ -572,7 +572,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_grow_incr_dir_fuzz]
[cases.test_grow_incr_spam_dir_fuzz]
defines.INIT_BLOCK_COUNT = 2
defines.REMOUNT = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
@@ -796,7 +796,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_grow_incr_file_many]
[cases.test_grow_incr_spam_file_many]
defines.INIT_BLOCK_COUNT = 2
defines.REMOUNT = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64]
@@ -942,7 +942,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_grow_incr_file_fuzz]
[cases.test_grow_incr_spam_file_fuzz]
defines.INIT_BLOCK_COUNT = 2
defines.REMOUNT = [false, true]
defines.N = [1, 2, 4, 8, 16, 32, 64]
@@ -1237,7 +1237,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_grow_incr_orphanzombie_fuzz]
[cases.test_grow_incr_spam_oz_fuzz]
defines.INIT_BLOCK_COUNT = 2
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
@@ -1661,7 +1661,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_grow_incr_orphanzombiedir_fuzz]
[cases.test_grow_incr_spam_ozd_fuzz]
defines.INIT_BLOCK_COUNT = 2
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
@@ -2189,7 +2189,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_grow_incr_file_pl_fuzz]
[cases.test_grow_incr_spam_f_pl_fuzz]
defines.INIT_BLOCK_COUNT = 2
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 256
@@ -2500,7 +2500,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_grow_incr_filedir_pl_fuzz]
[cases.test_grow_incr_spam_fd_pl_fuzz]
defines.INIT_BLOCK_COUNT = 2
# note dirs x files grows O(n^2)
defines.N = [1, 2, 4, 8]
+4 -4
View File
@@ -21,7 +21,7 @@ after = [
# We always make progress so this should be O(n) progs, (but maybe
# O(n^2) reads)
#
[cases.test_powerloss_dir_many]
[cases.test_powerloss_spam_dir_many]
defines.POWERLOSS_BEHAVIOR = [
'LFS_EMUBD_POWERLOSS_NOOP',
'LFS_EMUBD_POWERLOSS_SOMEBITS',
@@ -119,7 +119,7 @@ code = '''
# We always make progress so this should be O(n) progs, (but maybe
# O(n^2) reads)
#
[cases.test_powerloss_file_many]
[cases.test_powerloss_spam_file_many]
defines.POWERLOSS_BEHAVIOR = [
'LFS_EMUBD_POWERLOSS_NOOP',
'LFS_EMUBD_POWERLOSS_SOMEBITS',
@@ -219,7 +219,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_powerloss_file_pl_fuzz]
[cases.test_powerloss_spam_f_pl_fuzz]
defines.POWERLOSS_BEHAVIOR = [
'LFS_EMUBD_POWERLOSS_NOOP',
'LFS_EMUBD_POWERLOSS_SOMEBITS',
@@ -449,7 +449,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_powerloss_filedir_pl_fuzz]
[cases.test_powerloss_spam_fd_pl_fuzz]
defines.POWERLOSS_BEHAVIOR = [
'LFS_EMUBD_POWERLOSS_NOOP',
'LFS_EMUBD_POWERLOSS_SOMEBITS',
+8 -8
View File
@@ -12,7 +12,7 @@ after = [
# relatively aggressive wear-leveling.
# dirs + relocations may create problems for gstate
[cases.test_relocations_dir_many]
[cases.test_relocations_spam_dir_many]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]
code = '''
@@ -91,7 +91,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_relocations_dir_fuzz]
[cases.test_relocations_spam_dir_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
defines.OPS = 1024
@@ -242,7 +242,7 @@ code = '''
'''
# files + relocations may create problems for shrubs
[cases.test_relocations_file_many]
[cases.test_relocations_spam_file_many]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.SIZE = [
@@ -315,7 +315,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_relocations_file_fuzz]
[cases.test_relocations_spam_file_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
@@ -528,7 +528,7 @@ code = '''
'''
# open files + relocations may create problems for orphans/zombies
[cases.test_relocations_orphanzombie_fuzz]
[cases.test_relocations_spam_oz_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
@@ -868,7 +868,7 @@ code = '''
# open files + dirs + relocations can cause so many problems it's not worth
# listing them
[cases.test_relocations_orphanzombiedir_fuzz]
[cases.test_relocations_spam_ozd_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 1024
@@ -1296,7 +1296,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_relocations_file_pl_fuzz]
[cases.test_relocations_spam_f_pl_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
defines.N = [1, 2, 4, 8, 16, 32, 64]
defines.OPS = 256
@@ -1515,7 +1515,7 @@ code = '''
# the best. Most likely an internal assert will trigger if anything goes
# wrong.
#
[cases.test_relocations_filedir_pl_fuzz]
[cases.test_relocations_spam_fd_pl_fuzz]
defines.BLOCK_RECYCLES = [4, 1, 0]
# note dirs x files grows O(n^2)
defines.N = [1, 2, 4, 8]
+2 -2
View File
@@ -8297,7 +8297,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_traversal_spam_orphanzombie_fuzz]
[cases.test_traversal_spam_oz_fuzz]
# traverse steps between each op
defines.STEPS = [1, 2, 4, 8, 16, 32, 64, 128]
defines.MKCONSISTENT = [false, true]
@@ -8668,7 +8668,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
'''
[cases.test_traversal_spam_orphanzombiedir_fuzz]
[cases.test_traversal_spam_ozd_fuzz]
# traverse steps between each op
defines.STEPS = [1, 2, 4, 8, 16, 32, 64, 128]
defines.MKCONSISTENT = [false, true]