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

RTC Test Additions #72536

Open
RichardSWheatley opened this issue May 9, 2024 Discussed in #72480 · 4 comments
Open

RTC Test Additions #72536

RichardSWheatley opened this issue May 9, 2024 Discussed in #72480 · 4 comments
Assignees
Labels
area: RTC Real Time Clock area: Testsuite Testsuite Enhancement Changes/Updates/Additions to existing features

Comments

@RichardSWheatley
Copy link
Contributor

Current RTC testing for alarm includes only hour and minute.
Some RTCs do not allow such alarms and require more configs.

This Issue was formed from discussion below where the consensus was to have test coverage for RTC Full Config Alarm and for Partial Config Alarm (may or not be the ending names for the tests).

Discussed in #72480

Originally posted by RichardSWheatley May 8, 2024
Hello, @bjarki-trackunit!

You are the maintainer for the RTC section.
I am writing the Ambiq RTC driver when I noticed that the tests for RTC make some assumptions that are not true for the Ambiq RTC.

  1. We do not support 99-00 rollover which I already fixed in the tests by adding a check for EINVAL.
	if (ret == -EINVAL) {
		TC_PRINT("Rollover not supported\n");
		ztest_test_skip();
	} else {
		zassert_ok(ret, "RTC Set Time Failed");
	}
  1. When setting the alarms, for the Ambiq RTC you must set the entire struct with a non-zero value

This makes our implementation fail the most of the testing without additions to the tests.
I do not like to make additions to tests unless it is absolutely needed.

Do you think there is a better way to accomplish this?

image
image

@RichardSWheatley RichardSWheatley self-assigned this May 9, 2024
@RichardSWheatley RichardSWheatley added area: RTC Real Time Clock area: Testsuite Testsuite labels May 9, 2024
@RichardSWheatley
Copy link
Contributor Author

@bjarki-trackunit I have started the work but have gotten busy at my job.
I am commenting here so that this won't be marked stale.

@bjarki-trackunit
Copy link
Collaborator

Don't worry, the stale bot waits for 60 days :) also, I'm invested in the addition so if you don't have time I will gladly add it :)

@henrikbrixandersen henrikbrixandersen added the Enhancement Changes/Updates/Additions to existing features label May 14, 2024
@RichardSWheatley
Copy link
Contributor Author

Don't worry, the stale bot waits for 60 days :) also, I'm invested in the addition so if you don't have time I will gladly add it :)

I'm going to be honest, I do not have the time since my company is putting out new software releases monthly.

@bjarki-trackunit
Copy link
Collaborator

Noted, I will find time to do it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTC Real Time Clock area: Testsuite Testsuite Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants