diff --git a/scripts/test_.py b/scripts/test_.py index 1a13c5b..4593b40 100755 --- a/scripts/test_.py +++ b/scripts/test_.py @@ -304,8 +304,8 @@ class ReentrantTestCase(TestCase): # exact cycle we should drop into debugger? if gdb and failure and failure.cycleno == cycles: - return super().test(gdb=gdb, - persist=persist, failure=failure, **args) + return super().test(gdb=gdb, persist=persist, cycles=cycles, + failure=failure, **args) # run tests, but kill the program after prog/erase has # been hit n cycles. We exit with a special return code if the @@ -327,7 +327,7 @@ class TestSuite: self.name = self.name[:-len('.toml')] self.path = path self.classes = classes - self.defines = defines + self.defines = defines.copy() self.filter = filter with open(path) as f: diff --git a/testbd/lfs_testbd.c b/testbd/lfs_testbd.c index f13140e..0fae6bf 100644 --- a/testbd/lfs_testbd.c +++ b/testbd/lfs_testbd.c @@ -199,7 +199,7 @@ int lfs_testbd_prog(const struct lfs_config *cfg, lfs_block_t block, bd->power_cycles -= 1; if (bd->power_cycles == 0) { // sync to make sure we persist the last changes - lfs_testbd_rawsync(cfg); + assert(lfs_testbd_rawsync(cfg) == 0); // simulate power loss exit(33); } @@ -241,7 +241,7 @@ int lfs_testbd_erase(const struct lfs_config *cfg, lfs_block_t block) { bd->power_cycles -= 1; if (bd->power_cycles == 0) { // sync to make sure we persist the last changes - lfs_testbd_rawsync(cfg); + assert(lfs_testbd_rawsync(cfg) == 0); // simulate power loss exit(33); } diff --git a/tests_/test_files.toml b/tests_/test_files.toml index da132f2..565e665 100644 --- a/tests_/test_files.toml +++ b/tests_/test_files.toml @@ -60,7 +60,7 @@ code = ''' [[case]] # rewriting files define.SIZE1 = [32, 8192, 131072, 0, 7, 8193] define.SIZE2 = [32, 8192, 131072, 0, 7, 8193] -define.CHUNKSIZE = [31, 16, 1, 1025] +define.CHUNKSIZE = [31, 16, 1] code = ''' lfs_format(&lfs, &cfg) => 0; @@ -142,7 +142,7 @@ code = ''' [[case]] # appending files define.SIZE1 = [32, 8192, 131072, 0, 7, 8193] define.SIZE2 = [32, 8192, 131072, 0, 7, 8193] -define.CHUNKSIZE = [31, 16, 1, 1025] +define.CHUNKSIZE = [31, 16, 1] code = ''' lfs_format(&lfs, &cfg) => 0; @@ -219,7 +219,7 @@ code = ''' [[case]] # truncating files define.SIZE1 = [32, 8192, 131072, 0, 7, 8193] define.SIZE2 = [32, 8192, 131072, 0, 7, 8193] -define.CHUNKSIZE = [31, 16, 1, 1025] +define.CHUNKSIZE = [31, 16, 1] code = ''' lfs_format(&lfs, &cfg) => 0;