-
Notifications
You must be signed in to change notification settings - Fork 3k
FlashIAP: Add timing test #7383
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
How is this testing timing ? there are few asserts that check return type. The timing is only informative via printf ? |
The output of this test is indeed the information given to us via prints. Information we now gather, which can be a base for an extension of this test, in case we see outstanding results. |
Is it that we would run CI, you would gather results and update this PR to actually set some acceptable timing range ? @ARMmbed/mbed-os-test Please review |
Indeed so. May add other tests, but this is the most reasonable outcome. |
/morph build |
Build : SUCCESSBuild number : 2496 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 2140 |
Test : SUCCESSBuild number : 2272 |
9118dae
to
66152e6
Compare
Fixed a few bugs in calculations and pushed. @0xc0170 please rerun morph build. |
@davidsaada Need someone from @ARMmbed/mbed-os-storage to OK this before we can start CI. |
Running CI to gather test data as previously requested /morph build |
Build : SUCCESSBuild number : 2557 Triggering tests/morph test |
Test : SUCCESSBuild number : 2314 |
/morph export-build |
Pinging @ARMmbed/mbed-os-storage again |
Exporter Build : SUCCESSBuild number : 2206 |
On hold, awaiting an update. |
66152e6
to
f9db073
Compare
Added timing acceptance checks. |
General speaking, we do not recommend the use of We suggest using |
In addition to @jamesbeyond comment, we should try to avoid @davidsaada is there a way to reduce the traffic on uart as we have seen test failure because of it ref - IOTMORF-1861 |
Yes, Added a flash map print. Will remove it as it's not necessary for the test. |
TESTS/mbed_drivers/flashiap/main.cpp
Outdated
printf("Flash layout:\n"); | ||
while(address < end_address) { | ||
sector_size = flash_device.get_sector_size(address); | ||
printf("Address 0x%08x, size %6d\n", address, 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.
can we reduce the number of print for the test, we may hit similar issue to IOTMORF-1861
@jamesbeyond @studavekar Is this printf vs greentea kv / utest printf documented anywhere ? If not, can we add it. I've noticed this in some other tests also - often debug messages are left in tests. |
f9db073
to
57f4d05
Compare
Removed flash map prints. |
TESTS/mbed_drivers/flashiap/main.cpp
Outdated
|
||
if (num_write_sizes) { | ||
avg_erase_time /= num_write_sizes; | ||
printf("\nErase size %6u bytes: avg %10u, min %10u, max %10u (usec)\n\n", |
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.
still there are 3 prints that do not have any value until the test fails (if it fails, then printing erase size makes sense but only if it fails).
Can we remove all 3 printf from from this test case (move them to assert msg rather)
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.
@0xc0170 I would like to keep these prints to monitor these times also on success tests. We suspect these times can change with wear of the flash. They will also help us to understand for every device the level of intrusiveness of NVStore and SOTP
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.
Understood.
We suggest using utest_printf() or greentea_send_kv() to send messages to the serial output, which will achieve the same results.
@jamesbeyond Should these be updated to utest_printf() ?
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 these be updated to utest_printf() ?
We'd suggest to utest_printf() over printf(), unless they are not interchangeable. In your case, I think the outcome would be the same.
Because it is less risk of disturbing the greentea communication strings, especially greentea is busy polling on serial.
Is this printf vs greentea kv / utest printf documented anywhere ? If not, can we add it. I've noticed this in some other tests also - often debug messages are left in tests.
Sorry, we don't have a formal document about that. We will add one in.
@davidsaada Thoughts on @jamesbeyond' comment? |
57f4d05
to
7cf5b3a
Compare
Sorry, this slipped me. Updated all the code to use utest_printf. |
@davidsaada No worries, happens to all of us :) |
@0xc0170 @jamesbeyond @studavekar Mind re-reviewing? |
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.
/morph build |
Build : SUCCESSBuild number : 2728 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2364 |
Test : SUCCESSBuild number : 2458 |
…_test FlashIAP: Add timing test
Description
Add a timing test for FlashIAP erase and write operations.
Pull request type