agentleFS
containerscontainers/libkrun/.agents/skills/testing/SKILL.md

testing

Skill2.8k starsChanged 13 days agoApache-2.0View on GitHub

Run unit tests, integration tests, and FreeBSD guest tests for libkrun, or check CI test feature matrix. Use when running tests, executing make test or cargo test, or verifying test suites.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 172 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If /dev/kvm is unavailable, cargo test -p krun-kernel runs the kernel crate's unit tests without exercising the VMM tests.

    line 16

“Common” is measured: kept by at least 6 in 10 of the 172 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing libkrun

Unit tests

Unit tests run directly via cargo test. Some VMM tests on Linux require read/write access to /dev/kvm.

cargo test

If /dev/kvm is unavailable, cargo test -p krun-kernel runs the kernel crate's unit tests without exercising the VMM tests.

Integration tests

Integration tests live in tests/ as a separate Cargo workspace. By default, make test builds the FFI libraries, installs them to test-prefix/, and runs the dynamically linked tests. Pass FFI=0 to run the statically linked tests without installing libkrun. A custom libkrunfw installed in test-prefix/ remains available to either mode.

Running guest tests requires host hypervisor access (KVM on Linux or HVF on macOS) and libkrunfw. Some cases also need tools such as passt, gvproxy, and container tooling; see the CI setup for the full environment.

# Run all integration tests
make test

# Run the statically linked integration tests
make test FFI=0

# Run a single integration test
make test TEST=net-gvproxy

# Glob / wildcard matching
make test TEST="net-*"

# Comma-separated list of tests
make test TEST="net-gvproxy,pjdfstest"

# Run tests with optional features enabled
make test BLK=1

# Build and test against custom libkrunfw from source
make test LIBKRUNFW_SRC=/path/to/libkrunfw

FreeBSD guest tests

FreeBSD guest tests require building the FreeBSD init and sysroot first. They are automatically skipped if init-freebsd or the FreeBSD sysroot are not present.

# Build FreeBSD init and sysroot
make BUILD_BSD_INIT=1

# Run FreeBSD guest tests
make test TEST="freebsd-*"

CI Feature Matrix

The CI runs the following test and lint matrix across platforms. Every clippy command uses -D warnings, matching the workflows. Build the local library with make test-prefix NET=1 BLK=1 FFI=1 before running the Linux test-crate clippy commands that use test-prefix/.

Linux (x86_64)

  • Unit tests: cargo test (requires KVM access)
  • Clippy:
    • Default: cargo clippy --locked -- -D warnings
    • AMD SEV: cargo clippy --locked --features amd-sev -- -D warnings
    • Intel TDX: cargo clippy --locked --features tdx -- -D warnings
    • Devices: cargo clippy --locked --features net,blk,gpu,input -- -D warnings
    • AWS Nitro: cargo clippy --locked --features aws-nitro,net -- -D warnings
  • Integration tests: make test FFI=0 NET=1 BLK=1 and make test FFI=1 NET=1 BLK=1 (include FreeBSD guest tests when their prerequisites are present)
  • Test crate clippy:
    • From tests/: cargo clippy --locked -p test_cases --features guest -- -D warnings
    • From tests/, with the test prefix environment: PKG_CONFIG_PATH="$(realpath ../test-prefix/lib64/pkgconfig/)" LD_LIBRARY_PATH="$(realpath ../test-prefix/lib64/)" cargo clippy --locked -p test_cases --features dynamic-linking -- -D warnings
    • From tests/, with the test prefix environment: PKG_CONFIG_PATH="$(realpath ../test-prefix/lib64/pkgconfig/)" LD_LIBRARY_PATH="$(realpath ../test-prefix/lib64/)" cargo clippy --locked -p runner -- -D warnings
    • From tests/: cargo clippy --locked --target x86_64-unknown-linux-musl -p guest-agent -- -D warnings
  • Examples clippy: From examples/, after installing libkrun with GPU=1 NET=1 INPUT=1, run PKG_CONFIG_PATH="$HOME/libkrun-prefix/lib64/pkgconfig:$PKG_CONFIG_PATH" LD_LIBRARY_PATH="$HOME/libkrun-prefix/lib64:$LD_LIBRARY_PATH" cargo clippy --locked -- -D warnings
  • Bindings verification: Install ffier-gen-c-header as described in the bindings guide, run make gen-libkrun-bindings and make gen-init-blob-bindings, then verify git diff --exit-code bindings/ include/

Linux (aarch64)

  • Unit tests: cargo test
  • Clippy:
    • Default: cargo clippy --locked -- -D warnings
    • Devices: cargo clippy --locked --features net,blk,gpu,input -- -D warnings
  • Integration tests: make test FFI=0 NET=1 BLK=1 and make test FFI=1 NET=1 BLK=1 (include FreeBSD guest tests when their prerequisites are present)
  • Test crate clippy:
    • From tests/: cargo clippy --locked -p test_cases --features guest -- -D warnings
    • From tests/, with the test prefix environment: PKG_CONFIG_PATH="$(realpath ../test-prefix/lib64/pkgconfig/)" LD_LIBRARY_PATH="$(realpath ../test-prefix/lib64/)" cargo clippy --locked -p test_cases --features dynamic-linking -- -D warnings
    • From tests/, with the test prefix environment: PKG_CONFIG_PATH="$(realpath ../test-prefix/lib64/pkgconfig/)" LD_LIBRARY_PATH="$(realpath ../test-prefix/lib64/)" cargo clippy --locked -p runner -- -D warnings
    • From tests/: cargo clippy --locked --target aarch64-unknown-linux-musl -p guest-agent -- -D warnings
  • Examples clippy: From examples/, after installing libkrun with GPU=1 NET=1 INPUT=1, run PKG_CONFIG_PATH="$HOME/libkrun-prefix/lib64/pkgconfig:$PKG_CONFIG_PATH" LD_LIBRARY_PATH="$HOME/libkrun-prefix/lib64:$LD_LIBRARY_PATH" cargo clippy --locked -- -D warnings

macOS (aarch64)

  • Clippy: cargo clippy --locked --features gpu -- -D warnings
  • Cross-compilation build: make (Linux init) and make BUILD_BSD_INIT=1 (FreeBSD init)

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 1 mentionFeb 2026: 3 mentionsMar 2026: 3 mentionsApr 2026: 8 mentionsMay 2026: 13 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the containers/libkrun repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about containers/libkrun

The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 53

Talked about on GitHub and Bluesky (53 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 3

  • Other versions192 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 192

    1. modelcontextprotocol/servers★ 92ksame name
    2. lobehub/lobe-chat★ 84ksame name
    3. lobehub/lobehub★ 84ksame name
    4. penpot/penpot★ 62ksame name
    5. meteor/meteor★ 45ksame name
    6. iOfficeAI/AionUi★ 34ksame name
    7. garrytan/gbrain★ 31ksame name
    8. OpenZeppelin/openzeppelin-contracts★ 27ksame name
    9. tursodatabase/turso★ 25ksame name
    10. redis/go-redis★ 22ksame name

    182 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use bundle-dependency-prs, update-library-template and 8 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • MicrosoftSkill

      bundle-dependency-prs

      Fix broken dependency update PRs and aggregate the ones that work into one PR.

      Also in 6 projects that use this

    • MicrosoftSkill

      update-library-template

      Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.

      Also in 6 projects that use this

    • zetaloopSkill

      assign-copilot

      Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.

      Also in 3 projects that use this

    • timmo001Skill

      changeset-scope

      Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.

      Also in 3 projects that use this

    • JetBrainsSkill

      module-dependencies

      Add or modify IntelliJ module dependencies in `.iml` files.

      Also in 3 projects that use this

    • CES-LtdSkill

      oss-pr

      Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

      Also in 3 projects that use this

  • In this repository2 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.