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

Add Rust for Linux integration tests documentation #2004

Merged
merged 2 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- [Integration testing](./tests/integration.md)
- [Crater](./tests/crater.md)
- [Fuchsia](./tests/fuchsia.md)
- [Rust for Linux](./tests/rust-for-linux.md)
- [Performance testing](./tests/perf.md)
- [Suggest tests tool](./tests/suggest-tests.md)
- [Debugging the compiler](./compiler-debugging.md)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Integration jobs build large open-source Rust projects that are used as
regression tests in CI. Our integration jobs build the following projects:

- [Fuchsia](fuchsia.md)
- Linux kernel
- [Rust for Linux](rust-for-linux.md)

## A note about terminology

Expand Down
32 changes: 32 additions & 0 deletions src/tests/rust-for-linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Rust for Linux integration tests

[Rust for Linux](https://rust-for-linux.com/) (RfL) is an effort for adding support for the Rust programming
language into the Linux kernel.

## Building Rust for Linux in CI

Rust for Linux builds as part of the suite of bors tests that run before a pull request
is merged.

The workflow builds a stage1 sysroot of the Rust compiler, downloads the Linux kernel, and tries to compile several Rust for Linux drivers and examples using this sysroot. RfL uses several unstable compiler/language features, therefore this workflow notifies us if a given compiler change would break it.

If you are worried that a pull request might break the Rust for Linux builder and want
to test it out before submitting it to the bors queue, simply add this line to
your PR description:

> try-job: x86_64-rust-for-linux

Then when you `@bors try` it will pick the job that builds the Rust for Linux integration.

## What to do in case of failure

Currently, we use the following unofficial policy for handling failures caused by a change breaking the RfL integration:

- If the breakage was unintentional, then fix the PR.
- If the breakage was intentional, then let [RFL][rfl-ping] know and discuss what will the kernel need to change.
- If the PR is urgent, then disable the test temporarily.
- If the PR can wait a few days, then wait for RFL maintainers to provide a new Linux kernel commit hash with the needed changes done, and apply it to the PR, which would confirm the changes work.

If something goes wrong with the workflow, you can ping the [Rust for Linux][rfl-ping] ping group to ask for help.

[rfl-ping]: ../notification-groups/rust-for-linux.md