Skip to content

ci: test the linux5_13 feature - #96

Open
bchalios wants to merge 2 commits into
mainfrom
fix/ci
Open

bchalios wants to merge 2 commits into
mainfrom
fix/ci

Conversation

@bchalios

Copy link
Copy Markdown

CI never built or tested the linux5_13 feature, so this PR adds two test steps: --features linux5_13 and --features linux5_7,linux5_13.

Testing the combination exposed a compile error in test_write_protect. The root crate's kernel-version features don't chain: linux5_13 doesn't enable linux5_7, unlike in userfaultfd-sys. As a result, no configuration with both FaultKind::WriteProtected and FaultKind::Minor had ever been compiled, and the match on the fault kind was non-exhaustive. The fix adds a FaultKind::Minor arm that only exists with linux5_13.

The missing chaining will be fixed separately in 0.10.0. That change is breaking: enabling linux5_13 alone will also add
Event::Pagefault::thread_id. Once it lands, the combined test step will be redundant.

With both the linux5_7 and linux5_13 features enabled, FaultKind has a
Minor variant, and the match on the fault kind in test_write_protect
fails to compile as non-exhaustive. Add a Minor arm, compiled only with
linux5_13, that panics, since the test doesn't register the mapping in
minor mode.

Signed-off-by: Babis Chalios <mail@bchalios.io>
CI never built or tested the linux5_13 feature. Add a step for it, and
one for linux5_7 and linux5_13 together. The kernel version features of
the crate are independent of each other, so this is the only build that
has both the WriteProtected and Minor fault kinds.

Signed-off-by: Babis Chalios <mail@bchalios.io>
@bchalios bchalios self-assigned this Oct 18, 2026
@bchalios
bchalios requested a review from alsrdn October 18, 2026 16:05
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