diff --git a/test/test_key.c b/test/test_key.c index 0c2d49a4..a417f890 100644 --- a/test/test_key.c +++ b/test/test_key.c @@ -171,20 +171,22 @@ static void test_encode_eddsa(void **state) { int main() { struct lfs_config cfg; lfs_filebd_t bd; + struct lfs_filebd_config bdcfg = {.read_size = 1, .prog_size = 512, .erase_size = 512, .erase_count = 256}; + bd.cfg = &bdcfg; memset(&cfg, 0, sizeof(cfg)); cfg.context = &bd; cfg.read = &lfs_filebd_read; cfg.prog = &lfs_filebd_prog; cfg.erase = &lfs_filebd_erase; cfg.sync = &lfs_filebd_sync; - cfg.read_size = 16; - cfg.prog_size = 16; + cfg.read_size = 1; + cfg.prog_size = 512; cfg.block_size = 512; - cfg.block_count = 400; + cfg.block_count = 256; cfg.block_cycles = 50000; - cfg.cache_size = 128; - cfg.lookahead_size = 16; - lfs_filebd_create(&cfg, "lfs-root"); + cfg.cache_size = 256; + cfg.lookahead_size = 32; + lfs_filebd_create(&cfg, "lfs-root", &bdcfg); fs_format(&cfg); fs_mount(&cfg); diff --git a/test/test_oath.c b/test/test_oath.c index ed7bd3e3..00176ea6 100644 --- a/test/test_oath.c +++ b/test/test_oath.c @@ -431,20 +431,22 @@ static void test_space_full(void **state) { int main() { struct lfs_config cfg; lfs_filebd_t bd; + struct lfs_filebd_config bdcfg = {.read_size = 1, .prog_size = 512, .erase_size = 512, .erase_count = 256}; + bd.cfg = &bdcfg; memset(&cfg, 0, sizeof(cfg)); cfg.context = &bd; cfg.read = &lfs_filebd_read; cfg.prog = &lfs_filebd_prog; cfg.erase = &lfs_filebd_erase; cfg.sync = &lfs_filebd_sync; - cfg.read_size = 16; - cfg.prog_size = 16; + cfg.read_size = 1; + cfg.prog_size = 512; cfg.block_size = 512; - cfg.block_count = 400; + cfg.block_count = 256; cfg.block_cycles = 50000; - cfg.cache_size = 128; - cfg.lookahead_size = 16; - lfs_filebd_create(&cfg, "lfs-root"); + cfg.cache_size = 256; + cfg.lookahead_size = 32; + lfs_filebd_create(&cfg, "lfs-root", &bdcfg); fs_format(&cfg); fs_mount(&cfg); diff --git a/test/test_openpgp.c b/test/test_openpgp.c index 331bff6c..f6432aa6 100644 --- a/test/test_openpgp.c +++ b/test/test_openpgp.c @@ -211,20 +211,22 @@ static void test_special(void **state) { int main() { struct lfs_config cfg; lfs_filebd_t bd; + struct lfs_filebd_config bdcfg = {.read_size = 1, .prog_size = 512, .erase_size = 512, .erase_count = 256}; + bd.cfg = &bdcfg; memset(&cfg, 0, sizeof(cfg)); cfg.context = &bd; cfg.read = &lfs_filebd_read; cfg.prog = &lfs_filebd_prog; cfg.erase = &lfs_filebd_erase; cfg.sync = &lfs_filebd_sync; - cfg.read_size = 16; - cfg.prog_size = 16; + cfg.read_size = 1; + cfg.prog_size = 512; cfg.block_size = 512; - cfg.block_count = 400; + cfg.block_count = 256; cfg.block_cycles = 50000; - cfg.cache_size = 128; - cfg.lookahead_size = 16; - lfs_filebd_create(&cfg, "lfs-root"); + cfg.cache_size = 256; + cfg.lookahead_size = 32; + lfs_filebd_create(&cfg, "lfs-root", &bdcfg); fs_format(&cfg); fs_mount(&cfg); diff --git a/test/test_piv.c b/test/test_piv.c index a9be694f..59ba892e 100644 --- a/test/test_piv.c +++ b/test/test_piv.c @@ -121,20 +121,22 @@ static void test_regression_fuzz(void **state) { int main() { struct lfs_config cfg; lfs_filebd_t bd; + struct lfs_filebd_config bdcfg = {.read_size = 1, .prog_size = 512, .erase_size = 512, .erase_count = 256}; + bd.cfg = &bdcfg; memset(&cfg, 0, sizeof(cfg)); cfg.context = &bd; cfg.read = &lfs_filebd_read; cfg.prog = &lfs_filebd_prog; cfg.erase = &lfs_filebd_erase; cfg.sync = &lfs_filebd_sync; - cfg.read_size = 16; - cfg.prog_size = 16; + cfg.read_size = 1; + cfg.prog_size = 512; cfg.block_size = 512; - cfg.block_count = 400; + cfg.block_count = 256; cfg.block_cycles = 50000; - cfg.cache_size = 128; - cfg.lookahead_size = 16; - lfs_filebd_create(&cfg, "lfs-root"); + cfg.cache_size = 256; + cfg.lookahead_size = 32; + lfs_filebd_create(&cfg, "lfs-root", &bdcfg); fs_format(&cfg); fs_mount(&cfg);