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

tests/counter/counter_basic_api fails on mps2_an385 #24635

Closed
nordic-krch opened this issue Apr 23, 2020 · 11 comments
Closed

tests/counter/counter_basic_api fails on mps2_an385 #24635

nordic-krch opened this issue Apr 23, 2020 · 11 comments
Assignees
Labels
area: Counter bug The issue is a bug, or the PR is fixing a bug

Comments

@nordic-krch
Copy link
Contributor

Describe the bug
Test is failing on CI consistently but passes locally on my setup (Linux VM and WSL).

To Reproduce
?

Expected behavior
Test shall pass.

Impact
Test fails and makes CI red which prevents counter PRs integration.

Screenshots or console output

*** Booting Zephyr OS build zephyr-v2.2.0-1887-g2a8a54a4e910  ***
Running test suite test_counter
===================================================================
starting test - test_set_top_value_with_alarm
Testing TIMER_0

    Assertion failed at WEST_TOPDIR/zephyr/tests/drivers/counter/counter_basic_api/src/test_counter.c:198: test_set_top_value_with_alarm_instance: (top_cnt == 5U is false)
TIMER_0: Unexpected number of turnarounds (3).
FAIL - test_set_top_value_with_alarm
===================================================================
starting test - test_single_shot_alarm_notop
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_single_shot_alarm_notop
===================================================================
starting test - test_single_shot_alarm_top
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_single_shot_alarm_top
===================================================================
starting test - test_multiple_alarms
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_multiple_alarms
===================================================================
starting test - test_all_channels
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_all_channels
===================================================================
starting test - test_late_alarm
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_late_alarm
===================================================================
starting test - test_late_alarm_error
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_late_alarm_error
===================================================================
starting test - test_short_relative_alarm
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_short_relative_alarm
===================================================================
starting test - test_cancelled_alarm_does_not_expire
Skipped for TIMER_0
Skipped for TIMER_1
Skipped for DTIMER_0
PASS - test_cancelled_alarm_does_not_expire
===================================================================
starting test - test_set_top_value_without_alarm
Testing TIMER_0
Testing TIMER_1
Testing DTIMER_0
PASS - test_set_top_value_without_alarm
===================================================================
Test suite test_counter failed.
===================================================================
PROJECT EXECUTION FAILED
@nordic-krch nordic-krch added bug The issue is a bug, or the PR is fixing a bug area: Counter labels Apr 23, 2020
@stephanosio
Copy link
Member

Re-triggered CI on #24374 and #15623 one more time. I have seen this test fail up to three times in a row if I am very unlucky ...

@nordic-krch
Copy link
Contributor Author

@stephanosio on CI it fails almost always (if not always). On my setup never :/

@stephanosio
Copy link
Member

@stephanosio on CI it fails almost always (if not always). On my setup never :/

It happens when CPU load is high (i.e. when building and running multiple tests in parallel, as we do in sanitycheck).

@stephanosio
Copy link
Member

cc @nashif

@stephanosio
Copy link
Member

By the way, enabling QEMU icount should eventually get rid of this issue (at least, it did for qemu_cortex_r5). See #14173 and #22904.

@nordic-krch
Copy link
Contributor Author

i see, so CPU is emulating timer interrupt and interrupt gets delayed when CPU load is high?
any idea how to handle that?

@stephanosio
Copy link
Member

i see, so CPU is emulating timer interrupt and interrupt gets delayed when CPU load is high?
any idea how to handle that?

@nordic-krch See the comment above: #24635 (comment)

@carlescufi
Copy link
Member

@stephanosio, @andyross and @wentongwu is this a duplicate of #14173?

@stephanosio
Copy link
Member

stephanosio commented Apr 24, 2020

@stephanosio, @andyross and @wentongwu is this a duplicate of #14173?

@carlescufi I would say so. cc @andrewboie

@stephanosio
Copy link
Member

@wentongwu @andrewboie I wonder if we should merge the mps2_an385 portion of #22904 separately to make this problem go away, given that icount does indeed achieve what we want?

@carlescufi
Copy link
Member

Closing as duplicate of #14173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Counter bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

4 participants