On 2026-10-28T05:50:47, Ana Bobillo <[email protected]> wrote: > test: fs: ext4: add tests for corrupt on-disk indices > > Add tests that make a small ext4 image with mkfs.ext4 and check how > U-Boot handles the on-disk indices that the previous patches check: > > - test_fs_ext_oob_extent_header: an extent header with more entries > than the inode can hold must give "invalid extent block" > - test_fs_ext_oob_extent_loop: an extent index node pointing back at > itself must give "invalid extent block" rather than loop for ever > - test_fs_ext_oob_triple_indirect: a sparse file must read back > correctly through the second and third entries of its triple > indirect block > - test_fs_ext_oob_group_layout: writing to a filesystem with > s_blocks_per_group of zero must be refused > - test_fs_ext_oob_delete_block: replacing a file whose indirect block > lies past the end of the filesystem must fail with "Invalid block > number" > - test_fs_ext_oob_delete_inode: replacing a file whose directory entry > names an inode past the last block group, or the journal's inode, > must fail with "Invalid inode number" > - test_fs_ext_oob_last_inode: replacing a file whose inode is the last > of its block group must work and leave the filesystem clean for > e2fsck > > Each image is removed and host device 0 unbound even when a test fails. > > Signed-off-by: Ana Bobillo <[email protected]> > > scripts/pylint.base | 1 + > test/py/tests/test_fs/test_ext_oob.py | 310 > ++++++++++++++++++++++++++++++++++ > 2 files changed, 311 insertions(+)
Reviewed-by: Simon Glass <[email protected]>
