Skip to content

Disables flash clock and cache test #6340

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

Merged
merged 1 commit into from
Mar 20, 2018

Conversation

cmonr
Copy link
Contributor

@cmonr cmonr commented Mar 12, 2018

Has been causing intermittent morph test failures with NRF52_DK boards

Description

Disables the flash clock and cache tests. For a few weeks, this test would intermittently fail specifically against the NRF52_DK built against the GCC_ARM compiler.

An example failure:

[1520888954.03][CONN][RXD] >>> Running case #6: 'Flash - clock and cache test'...
[1520888954.11][CONN][INF] found KV pair in stream: {{__testcase_start;Flash - clock and cache test}}, queued...
[1520888954.77][CONN][RXD] :273::FAIL: Values Not Within Delta 3016 Expected 603210 Was 590241
[1520888954.77][CONN][INF] found KV pair in stream: {{__testcase_finish;Flash - clock and cache test;0;1}}, queued...
[1520888954.86][CONN][RXD] >>> 'Flash - clock and cache test': 0 passed, 1 failed with reason 'Assertion Failed'

Note: This is not expected to be a permanent fix, but should make tests more stable and save us some test-restart pains.

Pull request type

  • Fix
  • Refactor
  • New target
  • Feature
  • Breaking change

@cmonr
Copy link
Contributor Author

cmonr commented Mar 12, 2018

/morph build

@cmonr
Copy link
Contributor Author

cmonr commented Mar 12, 2018

Restarting. Let other PR take priority. (#6341)

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 13, 2018

Build : SUCCESS

Build number : 1426
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6340/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 13, 2018

const int acceptable_range = timer_diff_start / (ALLOWED_DRIFT_PPM);
TEST_ASSERT_UINT32_WITHIN(acceptable_range, timer_diff_start, timer_diff_end);
}
//void flash_clock_and_cache_test()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just comment call to this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to throw an extra warning about an unused function.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 13, 2018

Are we able to reproduce this error? Disabling a test is not an answer usually.

@cmonr
Copy link
Contributor Author

cmonr commented Mar 13, 2018

Are we able to reproduce this error? Disabling a test is not an answer usually.

Not realiably, but it's a failure error we've been seeing more of lately.
This PR was meant as a short term solution to the problem, with the (proper) long term solution to come after.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 13, 2018

This PR was meant as a short term solution to the problem, with the (proper) long term solution to come after.

Wouldn't be better to disable it just for one target then?

@studavekar
Copy link
Contributor

Are we able to reproduce this error? Disabling a test is not an answer usually.

we have seen this often on NRF52840_DK, it would be a good candidate to reproduce.

@cmonr
Copy link
Contributor Author

cmonr commented Mar 13, 2018

Wouldn't be better to disable it just for one target then?

Wasn't aware that was a thing. Will update the PR to do just that.

@studavekar
Copy link
Contributor

Wouldn't be better to disable it just for one target then?
Wasn't aware that was a thing. Will update the PR to do just that.

Probably nordic targets may be?

@cmonr cmonr requested a review from bridadan March 16, 2018 20:10
@cmonr
Copy link
Contributor Author

cmonr commented Mar 16, 2018

@studavekar Re-review requested.

Tested by compiling against NRF52_DK and K66F.

Will squash commits after an OK is given. Not completely sure this is the proper way to go about doing this.

@bridadan
Copy link
Contributor

@cmonr I'd change your check to the following:

#if !defined(TARGET_NRF52840_DK) || !defined(TARGET_NRF52_DK)

That should disable the test just for NRF52840_DK and NRF52_DK.

@bridadan
Copy link
Contributor

Another option is you could use those same checks to increase the expected delta for those targets.

@studavekar
Copy link
Contributor

I was thinking we protect the test case itself, instead of a pass

Case cases[] = {
    Case("Flash - init", flash_init_test),
    Case("Flash - mapping alignment", flash_mapping_alignment_test),
    Case("Flash - erase sector", flash_erase_sector_test),
    Case("Flash - program page", flash_program_page_test),
    Case("Flash - buffer alignment test", flash_buffer_alignment_test),
#if !defined(TARGET_NRF52840_DK) || !defined(TARGET_NRF52_DK)
    Case("Flash - clock and cache test", flash_clock_and_cache_test),
#endif
};

@SenRamakri
Copy link
Contributor

Yes, its better if we can avoid running the tests on targets where its not supported instead of providing a "False Pass" indication.

@bridadan
Copy link
Contributor

Agreed @studavekar and @SenRamakri

@cmonr
Copy link
Contributor Author

cmonr commented Mar 16, 2018

Will make changes per recommendations.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 19, 2018

Will make changes per recommendations.

@cmonr Can we resolve this today? asap

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmonr This is not how we disable tests for a target, or series of targets.

Instead, could you add a

#ifdef NORDIC
#error [NOT SUPPORTED] ...
#endif

somewhere in this file.

theotherjimmy
theotherjimmy previously approved these changes Mar 19, 2018
Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it back. I must have had an old cached copy of the code, where all tests were disabled.

@cmonr cmonr force-pushed the disable-failing-flash-test branch from 7f54bb7 to f18ecd1 Compare March 19, 2018 16:04
This is meant to be a temporary fix until the issue has been root caused, and Jenkins CI is no longer intermittently failing.
@studavekar studavekar mentioned this pull request Mar 19, 2018
5 tasks
@cmonr cmonr force-pushed the disable-failing-flash-test branch from f18ecd1 to 9f63013 Compare March 19, 2018 17:00
@cmonr
Copy link
Contributor Author

cmonr commented Mar 19, 2018

Re-requesting reviews.

@studavekar @0xc0170 @bridadan @adbridge @theotherjimmy

Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty simple.

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problems here

@studavekar
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 20, 2018

Build : SUCCESS

Build number : 1484
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6340/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 20, 2018

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shall not forget to fix this and reenable it later :)

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 20, 2018

cc @marcuschangarm (to be aware of this)

@mbed-ci
Copy link

mbed-ci commented Mar 20, 2018

@studavekar
Copy link
Contributor

@cmonr @0xc0170 @theotherjimmy should we merge this one?

@cmonr
Copy link
Contributor Author

cmonr commented Apr 2, 2018

Making a note here. This PR does not successfully disable the test.

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2018

Making a note here. This PR does not successfully disable the test.

Looking at the macro, would it be better TARGET_MCU_NRF52 ? would that solve it or what is the problem?

@cmonr
Copy link
Contributor Author

cmonr commented Apr 3, 2018

Looking at the macro, would it be better TARGET_MCU_NRF52 ? would that solve it or what is the problem?

I think that would be a better macro. Working on it right now. Will provide pre/post test logs with new PR to confirm the test is actually disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants