Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
70e0456
Makefile: Enable parallel test builds to cut down on build times
Jun 5, 2026
ab4e561
Change build targets to run from the workspace's top-level directory
Jun 5, 2026
a31eaf5
pre-commit config: remove reorder-python-imports (breaks black format…
Jun 8, 2026
378cafc
pre-commit: Apply migrate-config to fix deprecated stage names
Jun 8, 2026
02234f7
CI, xtf-runner, mkcfg.py, mkinfo.py: Remove Python 2.7 compatibility
Jun 12, 2026
9733902
build: Decrease incremental build time by using Ninja from 0.5s to 0.2s
Jun 8, 2026
f62942d
Add instructions for GitHub Copilot to run pre-commit after changes
Jun 12, 2026
940738f
Add isort, black and flake8 for Python formating & CI
Jun 8, 2026
3d7d3aa
Create new XTF test category nested-svm for nested SVM tests
Jun 11, 2026
056c505
Remove the obsolete empty placeholder nested-svm test
Jun 11, 2026
17f906f
CI: Bump actions: checkout@v7 (nodejs20 deprecation), codeql v3->v4
Jun 12, 2026
c5ff73a
CI: Switch build.yml to 24.04, re-add gcc-13, update clang versions
Jun 12, 2026
340b6cb
xtf-runner: split implementation into an importable Python package
Jun 12, 2026
19c9814
common/nested-svm: Add common infrastructure for testing nested VMRUN
Jul 9, 2026
070c300
Add nsvm test nested-svm-run: Smoke test VMRUN, with IF/HLT XFAIL
Jul 9, 2026
4dbfe0e
Add nested-svm test: nested-svm-loadsave - Test nested VMLOAD and VMSAVE
Jul 9, 2026
679edda
Add nested-svm test: nested-svm-stgi-clgi - Test STGI & CLGI
Jul 20, 2026
ee60d7d
Add pipeline.yaml to suppress the citrix-copyright-autofix bot
Jul 20, 2026
c4defe4
CI: Only run on pull requests (some orgs may deny push events)
Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501
50 changes: 50 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Repository Instructions for GitHub Copilot

## Building and Testing

Rules:
- Run "make" in the repository root to build all code, documentation,
and tests.
- Never attempt to compile only a subset of the repository.
Always build the entire repository.
- If the build does not rebuild the files you changed, you can assume that
another user already ran a build that produced the same output. You can skip the build and run tests directly.
- Test your changes by actually running the test using:

./xtf-runner <testcase>

Example: When testing the `tests/nested-svm-clgi-stgi` test, run:

./xtf-runner nested-svm-clgi-stgi

- Only after building and running tests should you run the final
validation command for Copilot-authored changes.

## CI validation

This repository uses `pre-commit` in CI.

It checks for code formatting, linting, and other issues in code,
build system, documentation, and tests. It is configured to run on
all files in the repository.

Among other checks, it runs:
- Adds missing trailing newlines to all files (add a trailing newline yourself)
- Removes trailing whitespace from all files.
- `isort`, `black`, and `flake8` for Python code.

The full list of checks is in the `.pre-commit-config.yaml` file in the
repository.

After making code, build-system, documentation, or test changes in this
repository, run:

```sh
SKIP=git-diff pre-commit run -av
```

Treat this as the final validation command for Copilot-authored changes.
If the command is unavailable or cannot complete in the current environment,
report that clearly along with any narrower checks that were run instead
and tell a human reviewer to install pre-commit using `pip install pre-commit`
and run the full command before merging.
75 changes: 0 additions & 75 deletions .github/workflows/build.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

# Some organisations do not allow workflows to run on push events,
# so we only run on pull requests.
on:
- pull_request

jobs:
python:
name: "Pre-commit Checks"
runs-on: ubuntu-24.04
steps:
# Some organisations require pinning of actions to a specific commit SHA.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Some organisations allow only verified actions to be used in workflows.
# The owner of this pre-commit action is verified:
- uses: cloudposse/github-action-pre-commit@ed9906221c8a4ee1dcb1e665da895998e0f7b396 # v4.1.0

C:
name: "C Builds"

strategy:
matrix:
arch: [x86]
compiler: [llvm-18, llvm-19, gcc-12, gcc-13, gcc-14]
runs-on: ubuntu-24.04

steps:
- name: Install
run: |
c=${{matrix.compiler}}
v=${c##llvm-}
case $c in
# Need all {clang,lld}-$v packages
llvm-*) EXTRA="clang-${v} lld-${v}" ;;
esac

sudo apt-get update -q
sudo apt-get install -y ${{matrix.compiler}} ${EXTRA}

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Build
run: |
# Select appropriate LLVM= or CC=
c=${{matrix.compiler}}
case $c in
llvm-*) COMP="LLVM=${c#llvm}" ;;
*) COMP="CC=$c" ;;
esac

make -j`nproc` ARCH=${{matrix.arch}} $CROSS $COMP

- name: scan-build
if: matrix.compiler == 'llvm-19'
run: |
sudo apt-get install -y clang-tools-19
scan-build-19 --status-bugs -analyze-headers make -j`nproc`
14 changes: 10 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:

jobs:
analyse:
# Only run CodeQL analysis on the main repository, not forks
# because forks may not have CodeQL analysis enabled and we
# don't want to run CodeQL analysis on forks to avoid wasting
# GitHub Actions minutes on forks. For test code, CodeQL analysis
# is not required, so we only run it on the main repository.
if: ${{ github.repository_owner == 'andyhhp' }}

strategy:
matrix:
Expand All @@ -17,13 +23,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: github/codeql-action/init@v3
- uses: github/codeql-action/init@v4
with:
languages: ${{matrix.lang}}
queries: security-and-quality

- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/autobuild@v4

- uses: github/codeql-action/analyze@v3
- uses: github/codeql-action/analyze@v4
20 changes: 0 additions & 20 deletions .github/workflows/scan-build.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
*.pyc
*.pyo
*.swp
/.ninja_deps
/.ninja_log
/arch/*/*.lds
/build/.xtf.ninja.*.context
/build/xtf.ninja
/build/xtf.ninja.vars
/cscope.*
/dist/
/docs/autogenerated/
Expand Down
60 changes: 55 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
#
# Installation notes:
# - Install pre-commit, e.g. via pip:
# pip install pre-commit
# - Enable it as git pre-commit hook for the current repository:
# pre-commit install

fail_fast: false
default_stages: [commit, push]
default_stages: [pre-commit, pre-push]
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -23,16 +28,61 @@ repos:
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
- id: mixed-line-ending
args: ['--fix=lf']
- id: trailing-whitespace

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0

# This is the pre-commit hook to run black, the Python code formatter.
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
# We use the --skip-string-normalization option to preserve the
# minimise churn initially, leaving string normalization for
# later cleanup commit to not mix with the formatting changes.
args: ['--skip-string-normalization']


# This is the isort hook recommended for use with black
- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort
args: ['--profile', 'black']


# This is the flake8 hook used by black itself:
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: reorder-python-imports
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- flake8-simplify


# This is the mypy hook:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.1.0
hooks:
- id: mypy
args: [--strict]
exclude: ^docs/gdb-test-fw/reference/
additional_dependencies:
- pytest
- types-gdb


# This is the pylint hook:
- repo: https://github.com/PyCQA/pylint
rev: v4.0.5
hooks:
- id: pylint


# Custom hook to show not staged changes, which may be caused by fixup commits.
- repo: local
hooks:
- id: git-diff # https://github.com/pre-commit/pre-commit/issues/1712
Expand Down
Loading