summaryrefslogtreecommitdiff
path: root/tests/extmod/vfs_blockdev_invalid.py
AgeCommit message (Collapse)Author
2024-10-22tests/extmod: Make invalid-blockdev test work consistently on all ports.Damien George
Some ports (eg stm32) configure the FAT driver differently (eg with multi-partition support) and that leads to a slightly different sequence of block reads, compared to other configurations (eg rp2). Comment out the printing in `readblocks()` so the tests are deterministic (the printing is still useful for debugging). Signed-off-by: Damien George <damien@micropython.org>
2024-09-26extmod/vfs_blockdev: Implement common helper for read and write.Angus Gratton
- Code size saving as all of these functions are very similar. - Resolves the "TODO" of the plain read and write functions not propagating errors. An error in the underlying block device now causes VFatFs to return EIO, for example. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-09-26extmod/vfs_blockdev: Check block device function positive results.Angus Gratton
A positive result here can result in eventual memory corruption as littlefs expects the result of a cache read/write function to be 0 or a negative integer for an error. Closes #13046 This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>