-
Notifications
You must be signed in to change notification settings - Fork 3k
Improve genenral BlockDevice tests #10110
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
c26ba5e
to
d4b9c96
Compare
@theamirocohen, thank you for your changes. |
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. Please just add these very minor fixes.
} | ||
|
||
end: | ||
delete[] write_block; | ||
delete[] read_block; | ||
if (read_block) { |
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.
Not needed. delete
ignores null pointers.
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.
done
} | ||
|
||
end: | ||
delete[] write_block; | ||
delete[] read_block; | ||
if (read_block) { |
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.
Same here.
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.
done
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.
LGTM.
91c15cb
to
5dd6144
Compare
@korjaa please review or comment if you don't plan to |
@theamirocohen is this just a test update? there seem to be changes in non-test code like: |
Fixing all rand issues, aligning erase addresses, moving prints to debug mode.
5dd6144
to
ba6748f
Compare
It was the #10108 PR code. |
@@ -47,13 +48,27 @@ | |||
#include "FlashIAPBlockDevice.h" | |||
#endif | |||
|
|||
// Debug available | |||
#ifndef MODE_DEBUG |
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 thought we had other debug macros.
Or is this the pattern used within the storage tests?
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.
@theamirocohen @davidsaada Would appreciate an answer here (I realise I only asked four hrs ago), but won't hold up the merge on it.
If it need to be fixed, it can be brought in later.
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.
This is unrelated to other debug macros. Original test code poured a lot of unnecessary prints during the test. Current change removed them (among the rest), by simply using the DEBUG_PRINT
define, which is turned off by default depending on MODE_DEBUG
. Guess these prints could have been removed altogether, but @theamirocohen took precautions by keeping them in for the case someone should want to see them while debugging.
CI started |
Improve genenral BlockDevice tests
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Description
Fixing all rand issues and aligning erase addresses by assigning explicit addresses, and by that removing FlashIAP restrictions.
Moving prints to debug mode.
This PR depends on #10108
Pull request type
Reviewers
@ARMmbed/mbed-os-storage
@korjaa