diff options
author | Brian Pugh <bnp117@gmail.com> | 2023-08-18 01:13:16 +0300 |
---|---|---|
committer | Brian Pugh <bnp117@gmail.com> | 2023-08-18 01:13:16 +0300 |
commit | 3d0bcf40667bc1778ca96c7036d97a4568b2933a (patch) | |
tree | 71f43d9420b8eb3f687bcb94b6b1ac943fef6a16 | |
parent | 6de3fc6ae84057062f5859b3446a33319d5c70e3 (diff) |
Add test_superblocks_mount_unknown_block_count
-rw-r--r-- | tests/test_superblocks.toml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/test_superblocks.toml b/tests/test_superblocks.toml index 0622a4a..a0d6388 100644 --- a/tests/test_superblocks.toml +++ b/tests/test_superblocks.toml @@ -5,7 +5,7 @@ code = ''' lfs_format(&lfs, cfg) => 0; ''' -# tests formatting from interpretting a previous superblock +# formatting from interpretting a previous superblock block_count [cases.test_superblocks_format_unknown_block_count] code = ''' lfs_t lfs; @@ -29,6 +29,20 @@ code = ''' lfs_unmount(&lfs) => 0; ''' +# mount/unmount from interpretting a previous superblock block_count +[cases.test_superblocks_mount_unknown_block_count] +code = ''' + lfs_t lfs; + lfs_format(&lfs, cfg) => 0; + + memset(&lfs, 0, sizeof(lfs)); + struct lfs_config tweaked_cfg = *cfg; + tweaked_cfg.block_count = 0; + lfs_mount(&lfs, &tweaked_cfg) => 0; + assert(lfs.block_count == cfg->block_count); +''' + + # reentrant format [cases.test_superblocks_reentrant_format] reentrant = true |