Repository navigation
Make the bad read-back test always differ - #80
Merged
Merged
Conversation
The production line test changed the image's last byte to 0x01 to fake a bad read-back, but the image ends in random bytes: 1 time in 256 the byte already was 0x01, the read-back matched and the board passed. That failed the Ubuntu 22.04 run on #79. Flip the byte instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ubuntu-22.04 smoke test on #79 failed with:
Cause:
check_production_linefakes a bad read-back by replacing the image's last byte with0x01. The image ends inos.urandom(5000), so 1 time in 256 that byte already is0x01. The read-back then matches and the board passes. The second line follows from the first, since the failure count is one short. The production code is fine.Fix: flip the last byte (
^ 0xFF), so the read-back always differs.I checked the other tests that modify random data:
data[100]set to0x00expects "no filler" either way, and the 0xCC case would need a random 512-byte block of 0xCC. Neither can flake like this.