Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/emubd
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-07-26 19:11:34 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-26 19:11:34 +0300
commit72e3bb44482e417d8a0408ecd16cb7ef96a6c2fc (patch)
tree14f9f2d027fe1c7355a74a4fea7528bf366cbdf1 /emubd
parent1aaf1cb6c06eb9cef9cd232ee41123d69e9cb79b (diff)
Refactored a handful of things in tests
- Now test errors have correct line reporting! #line directives are passed to the compiler that reference the relevant line in the test case shell script. --- Multi-block directory --- ./tests/test_dirs.sh:109: assert failed with 0, expected 1 lfs_unmount(&lfs) => 1 - Cleaned up the number of implicit global variables provided to tests. A lot of these were infrequently used and made it difficult to remember what was provided. This isn't an MCU, so there's very little cost to stack allocations when needed. - Minimized the results.py script (previously stats.py) output to match minimization of test output.
Diffstat (limited to 'emubd')
-rw-r--r--emubd/lfs_emubd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/emubd/lfs_emubd.c b/emubd/lfs_emubd.c
index 374c51c..943ddfb 100644
--- a/emubd/lfs_emubd.c
+++ b/emubd/lfs_emubd.c
@@ -197,7 +197,7 @@ int lfs_emubd_read(const struct lfs_config *cfg, lfs_block_t block,
}
}
- emu->stats.read_count += 1;
+ emu->stats.read_count += size;
LFS_TRACE("lfs_emubd_read -> %d", 0);
return 0;
}
@@ -270,7 +270,7 @@ int lfs_emubd_prog(const struct lfs_config *cfg, lfs_block_t block,
emu->history.blocks[0] = block;
}
- emu->stats.prog_count += 1;
+ emu->stats.prog_count += size;
LFS_TRACE("lfs_emubd_prog -> %d", 0);
return 0;
}
@@ -317,7 +317,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
}
}
- emu->stats.erase_count += 1;
+ emu->stats.erase_count += cfg->block_size;
LFS_TRACE("lfs_emubd_erase -> %d", 0);
return 0;
}