Skip to content

RtosTimer tests update #5425

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
Nov 9, 2017
Merged

Conversation

fkjagodzinski
Copy link
Member

Description

The RtosTimer test suite needs a fix/workaround for NRF51_DK board. As pointed out in this comment on #5323 tests-mbedmicro-rtos-mbed-rtostimer failed during ci-morph-test of a PR not related to RtosTimer. I'm unable to reproduce this behaviour on my NRF51_DK locally, but have found several failed ci-morph-tests:

They all fail on line 74, 115 or 232:

int32_t slots = sem.wait(TEST_DELAY_MS + 1);
t.stop();
TEST_ASSERT_EQUAL(1, slots);

slots = sem.wait(TEST_DELAY_MS + 1);
t.stop();
TEST_ASSERT_EQUAL(1, slots);

slots = sem.wait(TEST_DELAY2_MS + 1);
t.stop();
TEST_ASSERT_EQUAL(1, slots);

which means either sem is never released or there is a timing issue. Considering all failures happened on NRF51_DK target I assume a longer timeout is needed to prevent these random failures.

I've pushed one additional commit with code cleanup.

Status

READY

cc @bulislaw @0xc0170

Additional delay is needed to prevent random failures when
waiting for a semaphore.
Case("Test calls from ISR fail", test_isr_calls_fail)
Case("One-shot not restarted when elapsed", test_oneshot_not_restarted),
Case("Periodic repeats continuously", test_periodic_repeats),
Case("Stopped timer can be started again", test_start_again),
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing one of the tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I should have mentioned that. I decided to remove test_restart because it basically duplicates test_restart_updates_delay with a different delay.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 8, 2017

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 8, 2017

Build : SUCCESS

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

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Nov 8, 2017

@0xc0170 0xc0170 merged commit adfe004 into ARMmbed:master Nov 9, 2017
@fkjagodzinski fkjagodzinski deleted the test-rtostimer-update branch November 21, 2017 14:36
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