Skip to content

Baremetal: Enable Semaphore greentea test #12816

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 2 commits into from
Apr 21, 2020

Conversation

rajkan01
Copy link
Contributor

@rajkan01 rajkan01 commented Apr 16, 2020

Summary of changes

The Semaphore greentea test was disabled in baremetal profile as initially, Mbed OS did not have semaphore without using RTOS APIs, but recently support added. So enabled all the test cases except thread-based one, added the new test cases based on ticker instead of thread.

Impact of changes

With these changes, the baremetal Semaphore greentea test successfully builds and run.

Migration actions required

None.

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)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@evedon @kjbracey-arm


@ciarmcom ciarmcom requested review from evedon, kjbracey and a team April 16, 2020 13:00
@ciarmcom
Copy link
Member

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

kjbracey
kjbracey previously approved these changes Apr 16, 2020
Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

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

Seems fine, but is another one that will generate a conflict with my #12425 :(

That changes lots of tests like these to use Chrono for the timing values and APIs.

@mergify mergify bot added needs: CI and removed needs: review labels Apr 16, 2020
evedon
evedon previously requested changes Apr 17, 2020
Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

I noticed that some function headers were not updated for the change of API. The semaphore wait API was deprecated but it is not updated in some comments. Could you correct it in this PR please?

@mergify mergify bot added needs: work and removed needs: CI labels Apr 17, 2020
@mergify mergify bot dismissed stale reviews from kjbracey and evedon April 17, 2020 12:02

Pull request has been modified.

@rajkan01 rajkan01 force-pushed the semaphore_greentea_test branch from aea1237 to d7d11d5 Compare April 17, 2020 14:29

Given a semaphore with no tokens available and ticker with the callback registered
when the main thread calls @a try_acquire_for with 10ms timeout
then the main thread is blocked for 10ms
Copy link
Contributor

Choose a reason for hiding this comment

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

The main thread is blocked for 3ms as ticker releases the semaphore after 3ms.

@rajkan01 rajkan01 force-pushed the semaphore_greentea_test branch from d7d11d5 to a24419b Compare April 20, 2020 11:57
@mergify mergify bot added needs: CI and removed needs: work labels Apr 20, 2020
@rajkan01 rajkan01 requested a review from kjbracey April 20, 2020 13:08
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2020

Ci started (test might fail, currently checking for possible master issue)

@mbed-ci
Copy link

mbed-ci commented Apr 20, 2020

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2020

CI started

1 similar comment
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 20, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Apr 20, 2020

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@mbed-ci
Copy link

mbed-ci commented Apr 21, 2020

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 merged commit b9ab2d2 into ARMmbed:master Apr 21, 2020
@mergify mergify bot removed the ready for merge label Apr 21, 2020
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.

6 participants