Skip to content

Test: RTOS: Semaphore: Rework tests #4682

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
Jul 17, 2017
Merged

Conversation

bulislaw
Copy link
Member

Description

Add more unit style tests for Semaphore class and rework existing test.

Status

READY

CC: @0xc0170

@bulislaw
Copy link
Member Author

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 709

All builds and test passed!

@theotherjimmy
Copy link
Contributor

@0xc0170 @c1728p9 Could you review?


res = t.start(callback(single_thread, &data));
TEST_ASSERT_EQUAL(osOK, res);
Thread::yield();
Copy link
Contributor

Choose a reason for hiding this comment

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

you might consider using wait instead of yield here to make this test more deterministic. Depending when in the tick you yield the new thread still might not have enough time to call semaphore wait. Also, if the priority of main is below the priority of the new thread, then the yield won't help.

@bulislaw
Copy link
Member Author

/morph test

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

@bulislaw
Copy link
Member Author

/morph test

@bulislaw
Copy link
Member Author

retest uvisor

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 789

All builds and test passed!

@bulislaw
Copy link
Member Author

@0xc0170 ping

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 17, 2017

@c1728p9 happy with the update?

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.

5 participants