Skip to content

Commit

Permalink
test for failure when interpretting block count when formatting witho…
Browse files Browse the repository at this point in the history
…ut superblock
  • Loading branch information
BrianPugh committed Aug 17, 2023
1 parent 3d0bcf4 commit 2ebfec7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_superblocks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ code = '''
assert(lfs.block_count == cfg->block_count);
'''

# formatting from interpretting a non-existent previous superblock block_count
[cases.test_superblocks_format_unknown_block_count_failure]
code = '''
lfs_t lfs;
struct lfs_config tweaked_cfg = *cfg;
tweaked_cfg.block_count = 0;
lfs_format(&lfs, &tweaked_cfg) => LFS_ERR_CORRUPT;
'''

# mount/unmount
[cases.test_superblocks_mount]
Expand Down

0 comments on commit 2ebfec7

Please sign in to comment.