-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tests/pkg_tinyvcdiff: Initialize mtd->write_size #18529
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.
ping @jue89 if this makes sense? |
@@ -65,7 +65,8 @@ typedef struct { | |||
#define FAKE_MTD_INIT { .mtd = { .driver = &fake_mtd_driver, \ | |||
.sector_count = FAKE_MTD_SECTOR_COUNT, \ | |||
.pages_per_sector = FAKE_MTD_PAGES_PER_SECTOR, \ | |||
.page_size = FAKE_MTD_PAGE_SIZE } } | |||
.page_size = FAKE_MTD_PAGE_SIZE, \ | |||
.write_size = 1 } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe setting this to 4 (FAKE_MTD_WRITE_SIZE
) or would be more interesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the write granularity is not enforced by the fake_mtd_driver, I wouldn't expect anything interesting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thanks for the quick responses! |
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