-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable GhostFat auto-validation #93
Comments
See PR #94 for file system validation solution. At time of writing, code is written that:
In short, it's essentially written, except for the build integration and direct use of compressed known good image. |
thanks @henrygab very comprehensive, I always admire your passionate and effort put into PRs. This is a great idea, we can also include this test in the CI to make sure we won't break it while refactoring. Normally I would use Ceedling/CMock/Unity for testing since mocking/faking hardware make it easier to test with. Though please continue with your great work, later on I will try to see if I could use part of them as unit test :) |
Mocking is insufficient for testing of such a complex item as file system generation. I will focus on this. However, those seems like a very good fit for verifying the UF2 blocks "written" via ghostfat are properly translated into writes to the appropriate flash offset. I will leave this to you. |
GhostFAT requires unit tests
GhostFAT is quite complex (file systems are inherently complex), and is critical functionality relied upon for updating devices. As seen with the RPi Pico, sometimes it even gets burned into ROM.
The need to validate GhostFAT is thus critical. However, today this is an extremely manual process.
For example, validation that it generates a correct file system:
Similar steps are needed to validate that GhostFAT will extract the relevant portions of a .UF2 file, and send them to the board at the correct offset.
In short, it's a huge manual test effort, and confidence drops as additional features / combinations are supported.
The automated validation should compile as board variants, to keep the build environment identical where possible.
Here's a straw man of features and test cases that should be part of automated CI checks:
Features:
Test Cases:
Edge cases for compilation date / time stamps ? (e.g., Feb 29th)For Hathach to add via Ceedling/CMock/Unity
BOARD_UF2_FAMILY_ID
are NOT written to flashThe text was updated successfully, but these errors were encountered: