-
Notifications
You must be signed in to change notification settings - Fork 3k
Enable storage tests to all targets #12638
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
Conversation
#if !SECURESTORE_ENABLED still is needed to avoid runtime crash if TRNG is not available on particular target. |
Can you estimate what new boards are now under tests, if we remove these flags? |
I didnt check all targets but now most STM based, Cypress and Freescale NXP should pass or skip if TRNG is not available. |
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.
Looks good to me
CI started |
Test run: FAILEDSummary: 1 of 5 test jobs failed Failed test jobs:
|
I guess we now got the list of targets which needs to be checked against those newly enabled test cases.
In other words we need preceding PR - or multiple - which makes the test cases pass on those boards. The necessary changes can also be part of this PR from my point of view. |
Im fixing this test fails. |
0217460
to
1ebc8b1
Compare
Pull request has been modified.
// but minimum of 2 erase sectors, so that the garbage collection way work | ||
ul_bd_size = align_up(program_size * PAGES_ESTIMATE, erase_size * 2); | ||
rbp_bd_size = align_up(program_size * PAGES_ESTIMATE, erase_size * 2); | ||
ul_bd_size = align_up(program_size * PAGES_ESTIMATE, erase_size * 4); |
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.
Should we actually set some kind of upper limit for the size, maybe 32KiB?
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.
Why PAGES_ESTIMATE
is not a good limit?
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.
It was 8kB I had to increase to 16kB because set_add_data_set_key_value_five_Kbytes fails.
It seems that now is enough.
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.
PAGES_ESTIMATE is 40
program_size = sec_bd->get_program_size();
For QSPI this return MBED_CONF_QSPIF_QSPI_MIN_PROG_SIZE is 4
Maybe we should modify this ?
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.
erase_size is 4kB
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.
I guess @kyle-cypress would disagree about dropping the estimate, at least some of the Cypress boards have really small(512B) sector size
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.
Indeed, many of the Cypress boards with internal flash only have sector size = page size = 512K.
Another comment:
Why does this change the size to be aligned up to 4 * erase_size instead of 2. The intent of the current code is that PAGES_ESTIMATE reflects the main space requirement for the test. The align up to erase_size * 2 is just there because garbage collection requires two sectors in order to function properly, and on devices with a high sector to page size ratio PAGES_ESTIMATE may fit entirely in one sector.
If PAGES_ESTIMATE proves to be too low, I think the correct thing to do is to to increase PAGES_ESTIMATE. This will enable the size of the pre-test erase to adjust correspondingly.
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.
Reverted alignment. Fixed page size for STM and Nordic boards Qspi flash page size
|
||
#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) && !defined(TARGET_MCU_PSOC6) | ||
#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices, Fastmodels, and PSoC 6 | ||
#if !SECURESTORE_ENABLED |
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.
Is this intended to be a new hard requirement? The existing test checks for and disables the securestore-specific tests when securestore is not enabled.
If this test is being made completely dependent on SecureStore, the other securestore related ifdefs (e.g. in kvstore_init()) should be removed.
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. The purpose o this PR is to enable all storage tests if possible.
However if particular target doesn't support all necessary features test must be skipped and we can do nothing with this.
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.
The desire to enable all storage tests whenever possible doesn't seem to align with the check here.
Previously the test was structured so that it could run the FSStore and TDBStore tests on targets without SECURESTORE_ENABLED (if they were part of an otherwise limited list). Only the SecureStore dependent tests were disabled.
Now, the FSStore and TDBStore tests are also disabled when SecureStore is not enabled.
Are there not meaningful cases there SECURESTORE_ENABLED is false but TDBStore and FSStore do work?
Also, can you address this part of my previous comment?
If this test is being made completely dependent on SecureStore, the other securestore related ifdefs (e.g. in kvstore_init()) should be removed.
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.
You right. I will skip only SecureStore.
I need to fix TDBStore because there are crashes on targets without TRNG
@tymoteuszblochmobica please be aware you started lts job instead. This is targeting master, so needs regular master PR tests. |
I aborted it, will start regular CI now |
Test run: FAILEDSummary: 1 of 6 test jobs failed Failed test jobs:
|
CI passed, I'll clear old lts run from here now |
CI passed. @tymoteuszblochmobica Is this ready for integration? I see one review comment left : #12638 (comment) @kyle-cypress please review |
0xc0170 Not yet. I must correct flash page size and revert one test change. Will do it today |
1ebc8b1
to
2ca832c
Compare
Updated flash page size and align reverted. |
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
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.
Thanks for fixing the page size. Still some outstanding comments on on the way execution is conditioned on SECURESTORE_ENABLED but those are not critical from my side.
Storage tests is now enabled to all targets
Summary of changes
Many storage tests was enabled only to
-K64F
-Cypress PSOC6 targets
-ARM FM targets
This PR removes this limitation.
Impact of changes
No impact
Migration actions required
Not needed
Documentation
Not needed
Pull request type
Test results
Reviewers
@VeijoPesonen
@SeppoTakalo