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 ring on -*sel4* targets #54

Merged
merged 6 commits into from
Jan 6, 2024
Merged

Conversation

nspin
Copy link
Member

@nspin nspin commented Jan 6, 2024

The purpose of this PR is to get the ring crate compiling for *-sel4* targets and to run its unit tests on those targets.

First off, configuring upstream ring for certain baremetal targets is currently broken. For now, we will use coliasgroup/ring@10a2b3c, but I will propose a more suitable solution upstream.

Second, the test crate (libtest) that ships with the Rust toolchain requires std. I've discovered that you can run unit tests written for libtest by substituting an API-compatible crate with something like :

[dev-dependencies]
test = { package = "my-fake-test-harness", path = "../my-fake-test-harness" }

I also had to patch ring's tests to use no_std.

This PR uses this ring tree: https://github.com/coliasgroup/ring/tree/12eafcfa062e6713b6ee2123d90ca2a48bece768

Only the first patch mentioned will be necessary for using ring in this project, the others are just for running its unit on *-sel4* targets.

@nspin nspin changed the title Test ring on `-*sel4* targets Test ring on -*sel4* targets Jan 6, 2024
@nspin nspin force-pushed the pr/nix-cargo-test-and-ring branch from 7f6dfb8 to 4ae8c6b Compare January 6, 2024 00:58
@nspin nspin merged commit 673540c into seL4:main Jan 6, 2024
15 checks passed
@nspin nspin deleted the pr/nix-cargo-test-and-ring branch January 6, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant