From 66f5fa152a895e86afb66c0448c6ea610fe540d6 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 16 Jan 2025 14:37:39 -0600 Subject: [PATCH] emubd: Renamed LFS_EMUBD_POWERLOSS_NOOP -> LFS_EMUBD_POWERLOSS_ATOMIC Mainly to avoid ambiguity with PROGNOOP/ERASENOOP and make it clear emubd still simulates powerloss, but also because I think the name sounds cooler. --- bd/lfs_emubd.h | 2 +- runners/bench_runner.h | 2 +- runners/test_runner.h | 2 +- tests/test_powerloss.toml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bd/lfs_emubd.h b/bd/lfs_emubd.h index f35a9643..42e1989a 100644 --- a/bd/lfs_emubd.h +++ b/bd/lfs_emubd.h @@ -46,7 +46,7 @@ typedef enum lfs_emubd_badblock_behavior { // Mode determining how power-loss behaves during testing. typedef enum lfs_emubd_powerloss_behavior { - LFS_EMUBD_POWERLOSS_NOOP = 0, // Progs are atomic + LFS_EMUBD_POWERLOSS_ATOMIC = 0, // Progs are atomic LFS_EMUBD_POWERLOSS_SOMEBITS = 1, // One bit is progged LFS_EMUBD_POWERLOSS_MOSTBITS = 2, // All-but-one bit is progged LFS_EMUBD_POWERLOSS_OOO = 3, // Blocks are written out-of-order diff --git a/runners/bench_runner.h b/runners/bench_runner.h index 70abedcd..4d31eec0 100644 --- a/runners/bench_runner.h +++ b/runners/bench_runner.h @@ -124,7 +124,7 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size); BENCH_DEFINE(ERASE_VALUE, 0xff ) \ BENCH_DEFINE(ERASE_CYCLES, 0 ) \ BENCH_DEFINE(BADBLOCK_BEHAVIOR, LFS_EMUBD_BADBLOCK_PROGERROR ) \ - BENCH_DEFINE(POWERLOSS_BEHAVIOR, LFS_EMUBD_POWERLOSS_NOOP ) \ + BENCH_DEFINE(POWERLOSS_BEHAVIOR, LFS_EMUBD_POWERLOSS_ATOMIC ) \ BENCH_DEFINE(EMUBD_SEED, 0 ) // declare defines as global intmax_ts diff --git a/runners/test_runner.h b/runners/test_runner.h index 5ce87e10..9063b8c1 100644 --- a/runners/test_runner.h +++ b/runners/test_runner.h @@ -115,7 +115,7 @@ void test_permutation(size_t i, uint32_t *buffer, size_t size); TEST_DEFINE(ERASE_VALUE, 0xff ) \ TEST_DEFINE(ERASE_CYCLES, 0 ) \ TEST_DEFINE(BADBLOCK_BEHAVIOR, LFS_EMUBD_BADBLOCK_PROGERROR ) \ - TEST_DEFINE(POWERLOSS_BEHAVIOR, LFS_EMUBD_POWERLOSS_NOOP ) \ + TEST_DEFINE(POWERLOSS_BEHAVIOR, LFS_EMUBD_POWERLOSS_ATOMIC ) \ TEST_DEFINE(EMUBD_SEED, 0 ) // declare defines as global intmax_ts diff --git a/tests/test_powerloss.toml b/tests/test_powerloss.toml index 7ad38bb8..0dd53d16 100644 --- a/tests/test_powerloss.toml +++ b/tests/test_powerloss.toml @@ -23,7 +23,7 @@ after = [ # [cases.test_powerloss_spam_dir_many] defines.POWERLOSS_BEHAVIOR = [ - 'LFS_EMUBD_POWERLOSS_NOOP', + 'LFS_EMUBD_POWERLOSS_ATOMIC', 'LFS_EMUBD_POWERLOSS_SOMEBITS', 'LFS_EMUBD_POWERLOSS_MOSTBITS', 'LFS_EMUBD_POWERLOSS_OOO', @@ -121,7 +121,7 @@ code = ''' # [cases.test_powerloss_spam_file_many] defines.POWERLOSS_BEHAVIOR = [ - 'LFS_EMUBD_POWERLOSS_NOOP', + 'LFS_EMUBD_POWERLOSS_ATOMIC', 'LFS_EMUBD_POWERLOSS_SOMEBITS', 'LFS_EMUBD_POWERLOSS_MOSTBITS', 'LFS_EMUBD_POWERLOSS_OOO', @@ -221,7 +221,7 @@ code = ''' # [cases.test_powerloss_spam_f_pl_fuzz] defines.POWERLOSS_BEHAVIOR = [ - 'LFS_EMUBD_POWERLOSS_NOOP', + 'LFS_EMUBD_POWERLOSS_ATOMIC', 'LFS_EMUBD_POWERLOSS_SOMEBITS', 'LFS_EMUBD_POWERLOSS_MOSTBITS', 'LFS_EMUBD_POWERLOSS_OOO', @@ -451,7 +451,7 @@ code = ''' # [cases.test_powerloss_spam_fd_pl_fuzz] defines.POWERLOSS_BEHAVIOR = [ - 'LFS_EMUBD_POWERLOSS_NOOP', + 'LFS_EMUBD_POWERLOSS_ATOMIC', 'LFS_EMUBD_POWERLOSS_SOMEBITS', 'LFS_EMUBD_POWERLOSS_MOSTBITS', 'LFS_EMUBD_POWERLOSS_OOO',