-
Notifications
You must be signed in to change notification settings - Fork 3k
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
storage-kvstore-tdbstore-tests-TESTS-tdbstore-whitebox test fails on Toshiba Target #14128
Comments
Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. |
cc @ARMmbed/mbed-os-core |
Hi @hugueskamba . Could you please help us in resolving this issue? |
Are you also testing with the ARM toolchain? If so, please share the scatter file. If not, please provide the content of the GCC linker file. |
We have tested with ARM Toolchain. The results are slightly different when we use ARM Toolchain. Please find the ARM scatter file below: Please find the GCC linker script below: |
I had a look at the scatter file and here are my observations:
I amend the scatter file as follows. Can you please try it?
|
It looks like allocation failures in storage are not checked sometimes. For example, uses of I've created #14157 - I'm not sure if it's related to this issue or not. So it would be good to try @hugueskamba's suggestion first. |
Hi @hugueskamba ,we tried with the updated scatter file provided by you, having two region model. |
Hi @hugueskamba, did you find anything that must be causing this failure? |
Hi, |
@deepak-shreshti |
@deepak-shreshti From your log
So what this means is, the assertion that failed is line 387 of the test (i.e. P.S. |
The removal of flash simulator frees up some RAM, which is likely why the test now runs (and fails) instead of getting skipped like before. (The heap BD is always there, and the flash simulator used to be a thin layer on top.) |
I hope that the comments were useful in narrowing down your issue. As an open source project, we welcome fixes to Mbed OS, so we have opened this issue up for community contribution. |
We tried debugging this issue but could not arrive at some concrete conclusions. In mbed::TDBStore::reset() function call, it calls check_erase_before_write()(line 1199). After following the program flow for area = 1, we found check_erase_before_write() was calling erase_erase_unit() which gave call to _buff_bd->program()(program() function call of BufferedBlockDevice class). We feel memory issue is restricting things because of which test case is failing. We could not debug the real reason why it is failing in this 24K target. |
Hi @deepak-shreshti |
Hi Team,
Yes we tried with baremetal and received same error. We analyzed further and could PASS the testcase after reducing memory allocation for test case execution.
Test cases are passed with above changes for both GCC and ARM. Please let us know your feedback. Best Regards |
Hi Deepak, |
A block device can have a multitude of different storage types underneath. The erase size of the actual storage cannot be known; it has to be configured or passed in the constructor. @deepak-shreshti Your analysis was correct. Since this commit the test is no longer skipped as previously. Now, it would be useful to run this test on targets with less RAM, like yours. We could defiine a configuration parameter to run only a subset of the configurations defined in |
Dear Evelyne Donnaes , We reverted the commit you suggested and could PASS the test cases in GCC and ARM. Best Regards |
@deepak-shreshti Thanks for confirming. Since you can validate the changes on your target, can I suggest that you raise a PR with the commit mostly reverted? This will ensure that the test is skipped for constrained targets. Thank you for the contribution! |
Hi @deepak-shreshti, I've created #14483 to fix this test. It now uses Please let us know if there's any problem. Thanks again for raising this issue! |
Description of defect
We are trying to port new Toshiba MCU to mbed-os.
One of the greentea tests(storage-kvstore-tdbstore-tests-TESTS-tdbstore-whitebox) fails on this target.
The following FAIL log gets generated:
mbed-os-master-FAIL.log
Same test passes when run on target for previously released versions(mbed-os-6.6.0 or below).
In those versions, it skips the test telling "SKIP: Not enough heap to run test".
Below is the PASS log that gets generated using mbed-os-6.6.0:
mbed-os-6.6.0-PASS.log
In the current master package, flash simulator BD support has been removed and heap BD is used.
We are suspecting whether less ram is causing this failure or what.
This Toshiba Target has 24KB ram and 256KB flash storage.
Please help us in this regard.
Target(s) affected by this defect ?
New TOSHIBA MCU of which still porting to mbed-os is ongoing.
Toolchain(s) (name and version) displaying this defect ?
GCC_ARM 9 2019-q4-major
What version of Mbed-os are you using (tag or sha) ?
mbed-os-99.99.99
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed cli 1.8.2
How is this defect reproduced ?
Using the following command on mbed-os-master package:
mbed test -v -n storage-kvstore-tdbstore-tests-tests-tdbstore-whitebox
The text was updated successfully, but these errors were encountered: