diff --git a/bd/lfs3_emubd.h b/bd/lfs3_emubd.h index 49ea3acc..9c8eecd4 100644 --- a/bd/lfs3_emubd.h +++ b/bd/lfs3_emubd.h @@ -41,7 +41,7 @@ typedef enum lfs3_emubd_badblock_behavior { LFS3_EMUBD_BADBLOCK_MANUAL = 7, // Bits require manual flipping } lfs3_emubd_badblock_behavior_t; -// Mode determining how power-loss behaves during testing. +// Mode determining how powerloss behaves during testing. typedef enum lfs3_emubd_powerloss_behavior { LFS3_EMUBD_POWERLOSS_ATOMIC = 0, // Progs are atomic LFS3_EMUBD_POWERLOSS_SOMEBITS = 1, // One bit is progged @@ -117,19 +117,19 @@ struct lfs3_emubd_cfg { // The mode determining how bad-blocks fail lfs3_emubd_badblock_behavior_t badblock_behavior; - // Number of write operations (erase/prog) before triggering a power-loss. - // power_cycles=0 disables this. The exact behavior of power-loss is + // Number of write operations (erase/prog) before triggering a powerloss. + // power_cycles=0 disables this. The exact behavior of powerloss is // controlled by a combination of powerloss_behavior and powerloss_cb. lfs3_emubd_powercycles_t power_cycles; - // The mode determining how power-loss affects disk + // The mode determining how powerloss affects disk lfs3_emubd_powerloss_behavior_t powerloss_behavior; - // Function to call to emulate power-loss. The exact behavior of power-loss + // Function to call to emulate powerloss. The exact behavior of powerloss // is up to the runner to provide. void (*powerloss_cb)(void*); - // Data for power-loss callback + // Data for powerloss callback void *powerloss_data; // Seed for prng, which may be used for emulating failed progs. This does @@ -255,7 +255,7 @@ int lfs3_emubd_mkbad(const struct lfs3_cfg *cfg, lfs3_block_t block); // Clear any simulated wear on a given block int lfs3_emubd_mkgood(const struct lfs3_cfg *cfg, lfs3_block_t block); -// Get which bit failed, this changes on erase/power-loss unless manually set +// Get which bit failed, this changes on erase/powerloss unless manually set lfs3_ssize_t lfs3_emubd_badbit(const struct lfs3_cfg *cfg, lfs3_block_t block); diff --git a/lfs3.c b/lfs3.c index 87a999b5..7c9c81c6 100644 --- a/lfs3.c +++ b/lfs3.c @@ -15968,7 +15968,7 @@ static int lfs3_mountinited(lfs3_t *lfs3) { // pseudo-randomly using our gcksum as a prng // // the purpose of this is to avoid bad wear patterns such as always - // allocating blocks near the beginning of disk after a power-loss + // allocating blocks near the beginning of disk after a powerloss // lfs3->lookahead.window = lfs3->gcksum % lfs3->block_count; } diff --git a/runners/test_runner.c b/runners/test_runner.c index 5a0616d0..8818b777 100644 --- a/runners/test_runner.c +++ b/runners/test_runner.c @@ -1315,7 +1315,7 @@ static void list_implicit_defines(void) { -// scenarios to run tests under power-loss +// scenarios to run tests under powerloss static void run_powerloss_none( const test_powerloss_t *powerloss, @@ -1468,7 +1468,7 @@ static void run_powerloss_linear( exit(-1); } - // run the test, increasing power-cycles as power-loss events occur + // run the test, increasing power-cycles as powerloss events occur printf("running "); perm_printid(suite, case_, NULL, 0); printf("\n"); @@ -1480,7 +1480,7 @@ static void run_powerloss_linear( break; } - // power-loss! + // powerloss! printf("powerloss "); perm_printid(suite, case_, NULL, 0); printf(":x"); @@ -1552,7 +1552,7 @@ static void run_powerloss_log( exit(-1); } - // run the test, increasing power-cycles as power-loss events occur + // run the test, increasing power-cycles as powerloss events occur printf("running "); perm_printid(suite, case_, NULL, 0); printf("\n"); @@ -1564,7 +1564,7 @@ static void run_powerloss_log( break; } - // power-loss! + // powerloss! printf("powerloss "); perm_printid(suite, case_, NULL, 0); printf(":y"); @@ -1636,7 +1636,7 @@ static void run_powerloss_cycles( exit(-1); } - // run the test, increasing power-cycles as power-loss events occur + // run the test, increasing power-cycles as powerloss events occur printf("running "); perm_printid(suite, case_, NULL, 0); printf("\n"); @@ -1648,7 +1648,7 @@ static void run_powerloss_cycles( break; } - // power-loss! + // powerloss! assert(TEST_PLS <= powerloss->cycle_count); printf("powerloss "); perm_printid(suite, case_, powerloss->cycles, TEST_PLS+1); @@ -1823,7 +1823,7 @@ static void run_powerloss_exhaustive( exit(-1); } - // run the test, increasing power-cycles as power-loss events occur + // run the test, increasing power-cycles as powerloss events occur printf("running "); perm_printid(suite, case_, NULL, 0); printf("\n"); @@ -2038,10 +2038,10 @@ const char *const help_text[] = { "List all defines in this test-runner.", "List explicit defines in this test-runner.", "List implicit defines in this test-runner.", - "List the available power-loss scenarios.", + "List the available powerloss scenarios.", "Override a test define.", "How deep to evaluate recursive defines before erroring.", - "Comma-separated list of power-loss scenarios to test.", + "Comma-separated list of powerloss scenarios to test.", "Comma-separated range of permutations to run.", "Ignore test filters.", "Direct block device operations to this file.", @@ -2327,7 +2327,7 @@ int main(int argc, char **argv) { test_powerloss_count = 0; test_powerloss_capacity = 0; - // parse the comma separated list of power-loss scenarios + // parse the comma separated list of powerloss scenarios while (*optarg) { // allocate space test_powerloss_t *powerloss = mappend( @@ -2336,10 +2336,10 @@ int main(int argc, char **argv) { &test_powerloss_count, &test_powerloss_capacity); - // parse the power-loss scenario + // parse the powerloss scenario optarg += strspn(optarg, " "); - // named power-loss scenario + // named powerloss scenario size_t len = strcspn(optarg, " ,"); for (size_t i = 0; builtin_powerlosses[i].name; i++) { if (len == strlen(builtin_powerlosses[i].name) @@ -2469,7 +2469,7 @@ int main(int argc, char **argv) { powerloss_unknown:; // unknown scenario? - fprintf(stderr, "error: unknown power-loss scenario: %s\n", + fprintf(stderr, "error: unknown powerloss scenario: %s\n", optarg); exit(-1); diff --git a/scripts/test.py b/scripts/test.py index 142ec9f3..0db2993d 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -1677,7 +1677,7 @@ if __name__ == "__main__": test_parser.add_argument( '--list-powerlosses', action='store_true', - help="List the available power-loss scenarios.") + help="List the available powerloss scenarios.") test_parser.add_argument( '-D', '--define', action='append', @@ -1687,7 +1687,7 @@ if __name__ == "__main__": help="How deep to evaluate recursive defines before erroring.") test_parser.add_argument( '-P', '--powerloss', - help="Comma-separated list of power-loss scenarios to test.") + help="Comma-separated list of powerloss scenarios to test.") test_parser.add_argument( '--force', action='store_true',