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

sys/psa_crypto: allow repeated initialization #19990

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

mguetschow
Copy link
Contributor

Contribution description

  • simple unit test which calls psa_crypto_init() twice
  • fix to no re-initialize key slots (which left them in a broken state)

Testing procedure

  • make -C tests/sys/psa_crypto all test succeeds
  • git checkout HEAD~1 && make -C tests/sys/psa_crypto all test fails

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels Oct 19, 2023
@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 Oct 19, 2023
@riot-ci
Copy link

riot-ci commented Oct 19, 2023

Murdock results

✔️ PASSED

ceda440 add Makefile.ci

Success Failures Total Runtime
7953 0 7953 17m:56s

Artifacts

Copy link
Contributor

@Einhornhool Einhornhool left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

Proxy-ACK

@miri64
Copy link
Member

miri64 commented Oct 20, 2023

bors merge

bors bot added a commit that referenced this pull request Oct 20, 2023
19990: sys/psa_crypto: allow repeated initialization r=miri64 a=mguetschow

### Contribution description

- simple unit test which calls `psa_crypto_init()` twice
- fix to no re-initialize key slots (which left them in a broken state)

### Testing procedure

- `make -C tests/sys/psa_crypto all test` succeeds
- `git checkout HEAD~1 && make -C tests/sys/psa_crypto all test` fails



Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
@bors
Copy link
Contributor

bors bot commented Oct 20, 2023

Build failed:

@miri64
Copy link
Member

miri64 commented Oct 20, 2023

The test is to large for arduino-nano. Please add a Makefile.ci to the test directory with the following content

BOARD_INSUFFICIENT_MEMORY := \
    arduino-nano \
    #

@miri64
Copy link
Member

miri64 commented Oct 20, 2023

It might be worth to run

cd tests/sys/psa_crypto
./../../../dist/tools/insufficient_memory/create_makefile.ci.sh

directly (takes a while but uses Docker). Not sure, if Murdock cancels early if a build fails.

@mguetschow
Copy link
Contributor Author

It might be worth to run

cd tests/sys/psa_crypto
./../../../dist/tools/insufficient_memory/create_makefile.ci.sh

directly (takes a while but uses Docker). Not sure, if Murdock cancels early if a build fails.

Done. Should be ready for the next try.

@benpicco
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Oct 23, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@RIOT-OS RIOT-OS deleted a comment from bors bot Oct 23, 2023
bors bot added a commit that referenced this pull request Oct 23, 2023
19990: sys/psa_crypto: allow repeated initialization r=benpicco a=mguetschow

### Contribution description

- simple unit test which calls `psa_crypto_init()` twice
- fix to no re-initialize key slots (which left them in a broken state)

### Testing procedure

- `make -C tests/sys/psa_crypto all test` succeeds
- `git checkout HEAD~1 && make -C tests/sys/psa_crypto all test` fails



20011: tests/unittests: add a unit test for ztimer r=benpicco a=maribu

### Contribution description

This adds test coverage for removing ztimers with focus on ensuring that offsets are correctly updated on subsequent timers (e.g. not having timers fire too early).

### Testing procedure

Run the unit tests (will be done by the CI as well). Maybe also introduce a random bug in `ztimer_remove()` and check if this is indeed caught by the unit tests.

### Issues/PRs references

Prompted by #18977 (comment)

Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
@bors
Copy link
Contributor

bors bot commented Oct 23, 2023

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented Oct 23, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit a1e1931 into RIOT-OS:master Oct 23, 2023
25 checks passed
@mguetschow mguetschow deleted the psa-crypto-init-fix branch October 30, 2023 10:27
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.01 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System 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.

6 participants