Build kselftests the same way we do in kernel CI#58
Merged
roxanan1996 merged 3 commits intomainlinefrom Mar 2, 2026
Merged
Conversation
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
There was a problem hiding this comment.
Pull request overview
This PR updates how kselftests are built and executed to align more closely with kernel CI, including pre-building BPF tooling/samples and using the installed run_kselftest.sh harness.
Changes:
- Run
kernel_kselftest.shwithsudofrom the VM runner. - Make
virt.start()idempotent by ignoring “already active” failures. - Rework
kernel_kselftest.shto build bpftool + BPF samples, install selftests to a fixed path, and run via the installed runner.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| kt/ktlib/vm.py | Runs the kselftest script under sudo in the VM. |
| kt/ktlib/virt.py | Makes virsh start tolerate already-running domains. |
| kernel_kselftest.sh | Aligns kselftest build/run flow with kernel CI (bpftool/samples build + install + run). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
It does not return anything. Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
Useful when subtests can be disabled. This builds the bpftool, bpf samples and selftests, installs them to a fixed path KSELFTEST_PATH and then run them via the installed runner. Note: This needs root permission Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
af8a0bc to
23f20e4
Compare
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.
Note: There is still a difference in the number of tests we run.