Repository navigation
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI never built or tested the
linux5_13feature, so this PR adds two test steps:--features linux5_13and--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_13doesn't enablelinux5_7, unlike inuserfaultfd-sys. As a result, no configuration with bothFaultKind::WriteProtectedandFaultKind::Minorhad ever been compiled, and thematchon the fault kind was non-exhaustive. The fix adds aFaultKind::Minorarm that only exists withlinux5_13.The missing chaining will be fixed separately in 0.10.0. That change is breaking: enabling
linux5_13alone will also addEvent::Pagefault::thread_id. Once it lands, the combined test step will be redundant.