-
Notifications
You must be signed in to change notification settings - Fork 5
ci: run tmt e2e tests on GitHub-hosted runners with nested KVM #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
coiby
wants to merge
10
commits into
rhkdump:main
Choose a base branch
from
coiby:github_action_tmt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3e880ca
Clean Git hook env for ShellSpec
coiby c61f62f
Fix ShellSpec stderr warning on yes command when run in git hook
coiby 823c847
ci: run tmt e2e tests on GitHub-hosted runners with nested KVM
coiby 8329eff
ci: Use Fedora:43 to run the tests
coiby d3cf1fc
ci: 6.19.5-300.fc44 was deleted
coiby 0bb2002
ci: Copy xtrace logs to TMT_PLAN_DATA for debug
coiby 9ec2318
tests: include tmt.sh in test_lib.sh
coiby fe21199
ci: Only output kernel-auto-bisect/main.log for criu e2e test
coiby 994d586
ci: Only output kernel-auto-bisect/main.log for other e2e tests
coiby 13ec030
ci: Run e2e tests on Fedora container
coiby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: KAB tmt e2e tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| # ── Full e2e tests ──── | ||
| # | ||
| # Uses GitHub-hosted runners with nested KVM. Each plan provisions | ||
| # two Fedora VMs via testcloud and runs the bisection end-to-end. | ||
| # | ||
| tmt-run: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: quay.io/fedora/fedora:latest | ||
| options: "--privileged -v /dev:/dev --volume /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| plan: [ssh, ssh_src, ssh_auto, criu] | ||
| timeout-minutes: 480 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install tmt and start libvirtd | ||
| run: | | ||
| dnf install tmt+provision-virtual -yq | ||
| virtlogd -d | ||
| libvirtd -d | ||
| # verify KVM is available | ||
| test -e /dev/kvm && echo "KVM OK" || echo "WARNING: /dev/kvm missing" | ||
| virsh list --all | ||
|
|
||
|
|
||
| - name: Run e2e test (${{ matrix.plan }}) | ||
| run: | | ||
| # "-B finish" to skip shutting down KVM guests thus to bypass "libvirt: error : Failed to terminate process with SIGKILL: Device or resource busy" e.g. | ||
| # https://github.com/coiby/kernel-auto-bisect/actions/runs/27753332468/job/82108959294 | ||
| tmt run -B finish provision -h virtual -c system -i fedora:43 execute -vvv plans --name '/plans/${{ matrix.plan }}$' | ||
|
|
||
| - name: Upload tmt artifacts | ||
| uses: actions/upload-artifact@v7 | ||
| if: always() | ||
| with: | ||
| name: tmt-run-${{ matrix.plan }} | ||
| path: /var/tmp/tmt/run* | ||
| if-no-files-found: ignore |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --require spec_helper |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Git exports repository-local environment variables to hooks. They can make | ||
| # nested test repositories operate on the outer repository instead. | ||
| if command -v git >/dev/null 2>&1; then | ||
| unset $(git rev-parse --local-env-vars 2>/dev/null || :) | ||
| fi |
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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable
$SERVER_SSH_KEYshould be double-quoted to prevent word splitting and globbing if the path contains spaces or special characters.