Skip to content
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

Robustify equeue multithread unit test #12126

Merged
merged 1 commit into from
Dec 27, 2019

Conversation

kjbracey
Copy link
Contributor

Summary of changes

Rather than wait 10ms before breaking the other thread, and expecting at
least one event to have been run, wait for one event to be run, then
break.

Should avoid some spurious failures that have been seen.

Impact of changes

Migration actions required

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Reviewers


Rather than wait 10ms before breaking the other thread, and expecting at
least one event to have been run, wait for one event to be run, then
break.

Should avoid some spurious failures that have been seen.
@kjbracey kjbracey force-pushed the equeue_utest_robust branch from 4e0f61e to 2d37aa2 Compare December 17, 2019 14:20
@kjbracey
Copy link
Contributor Author

Failure seen today testing #12097 and others.

@ciarmcom ciarmcom requested a review from a team December 17, 2019 16:00
@ciarmcom
Copy link
Member

@kjbracey-arm, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@kjbracey kjbracey changed the title Robustify equeue multithread test Robustify equeue multithread unit test Dec 19, 2019
Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

Just one question

void touch()
{
lock();
if (count < 200) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 200? What is the significance of this value ?

Copy link
Contributor Author

@kjbracey kjbracey Dec 19, 2019

Choose a reason for hiding this comment

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

It's from the original code.

Don't think it's particularly magic - it's using an 8-bit counter for "how many times was this called", but stops incrementing at 200 to avoid any wrap possibility.

@adbridge
Copy link
Contributor

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 19, 2019

Test run: SUCCESS

Summary: 1 of 1 test jobs passed
Build number : 1
Build artifacts

@bulislaw
Copy link
Member

That wasn't requested for 5.15.x as far as i can tell?

@bulislaw bulislaw merged commit 5f495db into ARMmbed:master Dec 27, 2019
@bulislaw
Copy link
Member

bulislaw commented Jan 7, 2020

Test change. Lets pull it in the next patch.

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