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

test/periph_rtc: reset struct tm time between tests #19344

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

kfessel
Copy link
Contributor

@kfessel kfessel commented Mar 3, 2023

Contribution description

while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms values by resetting time and ms;

Testing procedure

run the test

Issues/PRs references

#19340

@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Mar 3, 2023
@kfessel kfessel requested a review from benpicco March 3, 2023 14:54
@kfessel
Copy link
Contributor Author

kfessel commented Mar 3, 2023

another solution would be to add struct tm to scopes where values are get

@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 3, 2023
@riot-ci
Copy link

riot-ci commented Mar 3, 2023

Murdock results

✔️ PASSED

0cfdd3d test/periph_rtc: reset struct tm time between tests

Success Failures Total Runtime
12 0 12 01m:16s

Artifacts

@kfessel
Copy link
Contributor Author

kfessel commented Mar 3, 2023

BORS MERGE

oops that was a little loud

did it get it?

i think it did

@benpicco
Copy link
Contributor

benpicco commented Mar 3, 2023

bors merge

bors bot added a commit that referenced this pull request Mar 3, 2023
19341: Picolibc updates r=benpicco a=keith-packard

### Contribution description

Minor updates to picolibc support for newer versions of picolibc, including 1.8.


### Testing procedure

Here's the current build result for a board I happen to have on my bench right now:

```
$ make -C examples/blinky BOARD=nucleo-f103rb FEATURES_REQUIRED=picolibc
...
/home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:319:1: error: unknown type name '_READ_WRITE_RETURN_TYPE'
  319 | _READ_WRITE_RETURN_TYPE read(int fd, void *dest, size_t count)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:351:1: error: unknown type name '_READ_WRITE_RETURN_TYPE'
  351 | _READ_WRITE_RETURN_TYPE write(int fd, const void *src, size_t count)
      | ^~~~~~~~~~~~~~~~~~~~~~~
...
```

### Description of changes

 1. Fix the read/write return values (Picolibc 1.8 uses POSIX standard types now)
 2. Add new symbols to linker scripts (Picolibc needs help dealing with TLS alignment)
 3. Insert carriage return when sending newline to console.


19344: test/periph_rtc: reset struct tm time between tests r=benpicco a=kfessel

### Contribution description

while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms  values by resetting time and ms;

### Testing procedure

run the test

### Issues/PRs references

#19340

Co-authored-by: Keith Packard <keithp@keithp.com>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
@bors
Copy link
Contributor

bors bot commented Mar 3, 2023

This PR was included in a batch that was canceled, it will be automatically retried

@bors
Copy link
Contributor

bors bot commented Mar 3, 2023

Build succeeded:

@bors bors bot merged commit 8c6926d into RIOT-OS:master Mar 3, 2023
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants