reviewer: skip patches meant for xfstests - #369
Draft
OllieinCanada wants to merge 1 commit into
Draft
Conversation
Signed-off-by: OllieinCanada <73385593+OllieinCanada@users.noreply.github.com>
Comment on lines
+77
to
+84
| !files.is_empty() | ||
| && files.iter().all(|file| { | ||
| let mut components = file.split('/'); | ||
| components.next() == Some("tests") | ||
| && components.next().is_some_and(|part| !part.is_empty()) | ||
| && components.next().is_some_and(|part| !part.is_empty()) | ||
| }) | ||
| } |
Collaborator
There was a problem hiding this comment.
a minor nitpick, but you could simplify .next() and the long RHS comparison with:
!files.is_empty() && files.iter().all(|file| {
let mut parts = file.split('/').filter(|p| !p.is_empty());
parts.next() == Some("tests") && parts.count() >= 2
})
}
derekbarbosa
left a comment
Collaborator
There was a problem hiding this comment.
Hi, sorry for the delay!
Thank you for the fix. This looks good. The review comments I posted are minor fixups.
However, this has me thinking if we should try and come up with a solution that would allow certain filepaths to be ignored per-subsystem.
// Linux selftests live under tools/testing. Top-level tests/<suite>/<case>
// paths identify xfstests patches, which must not be reviewed as kernel code.
but I am unsure if xfstests' usecase is unique or not. don't consider this a blocker for now :)
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.
Fixes #103
Summary
Skip patches that are clearly intended for xfstests before Sashiko attempts
Linux baseline selection, patch application, or AI review.
Root cause
New xfstests cases commonly add files below
tests/<suite>/<case>. Because newfiles can apply cleanly to the Linux checkout, Sashiko can mistake the patch
for a kernel change and spend model tokens reviewing it in the wrong
repository.
Changes
tests/<suite>/<path>layout used by xfsteststools/testing/, normal kernel paths, emptydiffs, and mixed kernel/xfstests diffs in the existing review path
Validation
Skipped, the patchset becomesReviewed, and no review record is createdcargo clippy --all-targets --all-features --release -- -D warningscargo fmt --all -- --checkgit diff --check408 passed, 15 intentionally ignored, no other failures
The unfiltered local suite reaches the existing Git-version-dependent failure
from #350, which is addressed separately by #368.