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_basic_api: Failed on stm32 based boards #21745

Closed
erwango opened this issue Jan 7, 2020 · 2 comments · Fixed by #22262 or #22305
Closed

tests: counter_basic_api: Failed on stm32 based boards #21745

erwango opened this issue Jan 7, 2020 · 2 comments · Fixed by #22262 or #22305
Assignees
Labels
area: Counter bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@erwango
Copy link
Member

erwango commented Jan 7, 2020

Describe the bug
Test failed on following boards: nucleo_l476rg, nucleo_wb55rg

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=board_xyz
  3. make
  4. See error

Expected behavior
Test should pass.

Screenshots or console output

Running test suite test_counter
===================================================================
starting test - test_set_top_value_with_alarm
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_set_top_value_with_alarm
===================================================================
starting test - test_single_shot_alarm_notop
Testing RTC_0

    Assertion failed at ../../src/test_counter.c:297: test_single_shot_alarm_instance: (0 not equa)
RTC_0: Setting top value to default failed
FAIL - test_single_shot_alarm_notop
===================================================================
starting test - test_single_shot_alarm_top
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_single_shot_alarm_top
===================================================================
starting test - test_multiple_alarms
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_multiple_alarms
===================================================================
starting test - test_all_channels
Testing RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_all_channels
===================================================================
starting test - test_late_alarm
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_late_alarm
===================================================================
starting test - test_late_alarm_error
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_late_alarm_error
===================================================================
starting test - test_short_relative_alarm
Testing RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_short_relative_alarm
===================================================================
starting test - test_cancelled_alarm_does_not_expire
Skipped for RTC_0

    Assertion failed at ../../src/test_counter.c:102: counter_tear_down_instance: (0 not equal to )
RTC_0: Setting top value to default failed
FAIL - test_cancelled_alarm_does_not_expire
===================================================================
Test suite test_counter failed.
===================================================================
PROJECT EXECUTION FAILED

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used

Additional context
Add any other context about the problem here.

@erwango erwango added bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 area: Counter priority: medium Medium impact/importance bug labels Jan 7, 2020
@jhedberg
Copy link
Member

jhedberg commented Jan 7, 2020

@erwango will you be looking at this? If not, please reassign.

@erwango
Copy link
Member Author

erwango commented Jan 24, 2020

In counter_tear_down_instance, counter_set_top_value(dev, &top_cfg) is called with following top_cfg value:

	struct counter_top_cfg top_cfg = {
		.callback = NULL,
		.user_data = NULL,
		.flags = 0
	};

Then, it fails on error.

I don't think this call is matching description of counter_set_top_value contract in counter.h.
@nordic-krch as counter API owner, can you verify?

@erwango erwango assigned nordic-krch and unassigned erwango Jan 24, 2020
@erwango erwango removed the platform: STM32 ST Micro STM32 label Jan 24, 2020
erwango added a commit to erwango/zephyr that referenced this issue Jan 29, 2020
test_single_shot_alarm_instance may fail due to not supported setting
of top_value in call to counter_set_top_value.
Modified to accept not supported case.

Fixes zephyrproject-rtos#21745

Signed-off-by: Erwan Gouriou <[email protected]>
ioannisg pushed a commit that referenced this issue Jan 31, 2020
test_single_shot_alarm_instance may fail due to not supported setting
of top_value in call to counter_set_top_value.
Modified to accept not supported case.

Fixes #21745

Signed-off-by: Erwan Gouriou <[email protected]>
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 priority: medium Medium impact/importance bug
Projects
None yet
3 participants