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

Test: RTOS: Semaphore: Rework tests #4682

Merged
merged 2 commits into from Jul 17, 2017

Conversation

Projects
None yet
5 participants
@bulislaw
Member

bulislaw commented Jun 30, 2017

Description

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

Status

READY

CC: @0xc0170

@bulislaw

This comment has been minimized.

Member

bulislaw commented Jun 30, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jun 30, 2017

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

This comment has been minimized.

Contributor

theotherjimmy commented Jul 10, 2017

@0xc0170 @c1728p9 Could you review?

TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp Outdated
res = t.start(callback(single_thread, &data));
TEST_ASSERT_EQUAL(osOK, res);
Thread::yield();

This comment has been minimized.

@c1728p9

c1728p9 Jul 10, 2017

Contributor

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 bulislaw force-pushed the bulislaw:sem_tests branch Jul 11, 2017

@bulislaw

This comment has been minimized.

Member

bulislaw commented Jul 11, 2017

/morph test

@bulislaw bulislaw force-pushed the bulislaw:sem_tests branch to 2963308 Jul 11, 2017

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 11, 2017

Result: FAILURE

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

/morph test

@bulislaw

This comment has been minimized.

Member

bulislaw commented Jul 12, 2017

/morph test

@bulislaw

This comment has been minimized.

Member

bulislaw commented Jul 12, 2017

retest uvisor

@mbed-bot

This comment has been minimized.

mbed-bot commented Jul 12, 2017

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

This comment has been minimized.

Member

bulislaw commented Jul 17, 2017

@0xc0170 ping

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jul 17, 2017

@c1728p9 happy with the update?

@theotherjimmy theotherjimmy merged commit 160940b into ARMmbed:master Jul 17, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment