tests/pkg_tinyvcdiff: Initialize mtd->write_size#18529
Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom Aug 30, 2022
Merged
tests/pkg_tinyvcdiff: Initialize mtd->write_size#18529benpicco merged 1 commit intoRIOT-OS:masterfrom
benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
An assert `assert(mtd->write_size != 0);` is being hit. It seems that initializing this to 1 in the fakemtd fixes it. Not that I know anything about what it should be.
Contributor
Author
|
ping @jue89 if this makes sense? |
benpicco
reviewed
Aug 30, 2022
| .pages_per_sector = FAKE_MTD_PAGES_PER_SECTOR, \ | ||
| .page_size = FAKE_MTD_PAGE_SIZE } } | ||
| .page_size = FAKE_MTD_PAGE_SIZE, \ | ||
| .write_size = 1 } } |
Contributor
There was a problem hiding this comment.
Maybe setting this to 4 (FAKE_MTD_WRITE_SIZE) or would be more interesting
Member
There was a problem hiding this comment.
As the write granularity is not enforced by the fake_mtd_driver, I wouldn't expect anything interesting.
benpicco
approved these changes
Aug 30, 2022
jue89
approved these changes
Aug 30, 2022
Contributor
jue89
left a comment
There was a problem hiding this comment.
Yes, seems right! write_size indicates alignment and minimum amount of bytes to write on the underlying mtd. The fakemtd can be written byte-wise.
Contributor
Author
|
Thanks for the quick responses! |
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.
Contribution description
An assert
assert(mtd->write_size != 0);is being hit withnative.It seems that initializing this to 1 in the fakemtd fixes it.
Not that I know anything about what it should be. If one looks at some of the other write_sizes it seems that would make sense.
Testing procedure
Run the following, it should not longer fail:
I think murdock should have caught it... Maybe add CI: run_tests label.
Issues/PRs references
Introduced with the initial test #17797