Skip to content

Build kselftests the same way we do in kernel CI#58

Merged
roxanan1996 merged 3 commits intomainlinefrom
{rnicolescu}_kselftests
Mar 2, 2026
Merged

Build kselftests the same way we do in kernel CI#58
roxanan1996 merged 3 commits intomainlinefrom
{rnicolescu}_kselftests

Conversation

@roxanan1996
Copy link
Contributor

Note: There is still a difference in the number of tests we run.

Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
Copilot AI review requested due to automatic review settings February 27, 2026 16:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh with sudo from the VM runner.
  • Make virt.start() idempotent by ignoring “already active” failures.
  • Rework kernel_kselftest.sh to 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>
@roxanan1996 roxanan1996 force-pushed the {rnicolescu}_kselftests branch from af8a0bc to 23f20e4 Compare March 2, 2026 12:26
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@roxanan1996 roxanan1996 merged commit 0fcf7a2 into mainline Mar 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants