This branch is being reworked from a clean slate.
The previous implementation snapshot is preserved at:
- Git tag:
rework-take-1 - Directory:
old/rework-take-1/
This repo now contains a minimal 9p client smoke test harness:
- QEMU runs an arm64 Linux kernel
Image - QEMU exports a host directory via virtio-9p
- An initrd runs the smoke test inside the guest (no SSH)
- The test exercises basic filesystem operations on the 9p mount
- Build the image:
docker pull ghcr.io/v9fs/docker:latest- Put a kernel
Imageat./kernel/.build/arch/arm64/boot/Image - Run the smoke test:
make docker-smokeLogs land under ./logs/<timestamp>/ (QEMU serial is qemu.log; guest writes guest.log + guest.exitcode).
This repository contains test code and scripts for exercising the Linux 9p (v9fs) filesystem.
The kernel source under test lives in the upstream repository:
https://github.com/v9fs/linux
- CI workflows: automation to build/run tests against a chosen kernel revision
- Test code: focused repros and regression tests for v9fs behavior
- Scripts: helpers to run locally and/or in CI
- Development branch: all active work happens on
rework - Change log: keep
CHANGES.mdupdated for every change set - Work tracking: keep
TODO.mdupdated as items are added/removed
This repo intentionally does not vendor the kernel source. Most workflows/scripts will:
- Fetch
github.com/v9fs/linux(or a fork/branch you specify) - Build the kernel (or use a provided artifact)
- Run the tests in this repository against that kernel
Clone the kernel repo beside this repo:
git clone https://github.com/v9fs/linux ../linuxBuild the test environment image:
docker build -t v9fs-test-env:local .Build the kernel once (and export it as a reusable artifact):
mkdir -p ./tmp ./kernel
docker run --rm --privileged \
-v "$PWD:/home/v9fs-test/test" \
-v "$PWD/../linux:/workspaces/linux" \
-v "$PWD/kernel:/workspaces/kernel" \
-v "$PWD/tmp:/workspaces/tmp" \
-w /home/v9fs-test/test \
v9fs-test-env:local \
bash -lc "v9fs-build-kernel && v9fs-export-kernel /workspaces/linux /workspaces/linux/.build /workspaces/kernel"Then run tests repeatedly without rebuilding the kernel:
mkdir -p ./tmp
docker run --rm --privileged \
-e KERNELBUILD=/workspaces/kernel/.build \
-v "$PWD:/home/v9fs-test/test" \
-v "$PWD/kernel:/workspaces/kernel" \
-v "$PWD/tmp:/workspaces/tmp" \
-w /home/v9fs-test/test \
v9fs-test-env:local \
bash -lc "v9fs-run-tests short ci"v9fs-run-tests boots QEMU with an initrd that mounts the host-exported workspace
over 9p and then runs the suite inside the guest (no SSH/port-forwarding).
The host-visible output is primarily the QEMU serial log:
logs/<timestamp>/qemu.log
The guest mounts the repo at /mnt/9/test (see scripts/v9fs-guest-run).
CI uses the same Docker + QEMU flow as local development, but kernel builds are published separately from the harness tests:
- A dedicated workflow builds
v9fs/linuxand publishes the arm64Imageto GitHub Releases (and GHCR). - The harness workflows download that published
Imageintokernel/.build/arch/...and runv9fs-run-tests ...with--privilegedso the harness can bind-mount a stable 9p export root (/workspaces/share).
| Workflow | File | When it runs |
|---|---|---|
| Publish Linux kernel | .github/workflows/linux-kernel-publish.yml |
**repository_dispatch** from v9fs/linux (recommended) or **workflow_dispatch** here. Builds arm64 Image, uploads it to a release tag you choose (kernel-main, kernel-nightly, kernel-<version>, …), and pushes a GHCR bundle tagged by the linux commit SHA plus your release tag. |
| CI (push and manual) | .github/workflows/demand.yml |
On every push (all branches), manual dispatch, or **workflow_call**. Downloads Image from the **kernel-main** release by default (override via kernel_release). |
| Mainline | .github/workflows/nightly.yml |
Daily schedule + manual dispatch. Downloads Image from **kernel-nightly** by default (override via kernel_release). |
Because GitHub Actions cannot natively “watch” another repository’s pushes, the
v9fs/linux repo should call repository_dispatch on v9fs/test when branches change
(see the header comment in linux-kernel-publish.yml for an example payload).
Published kernels are also pushed to GitHub Packages (GHCR) as an OCI artifact:
- Package:
ghcr.io/v9fs/v9fs-test-kernel - Tags:
linux-<kernel_commit_sha>(immutable)- The release tag you passed (e.g.
kernel-main,kernel-nightly,kernel-6.12.0)
oras pull ghcr.io/v9fs/v9fs-test-kernel:linux-<sha> -o .
tar -tzf kernel-image.tar.gz | headThe publish workflow uploads the arm64 kernel Image as a stable release asset:
- Rolling mainline:
https://github.com/v9fs/test/releases/download/kernel-main/Image - Rolling nightly:
https://github.com/v9fs/test/releases/download/kernel-nightly/Image - Versioned (example):
https://github.com/v9fs/test/releases/download/kernel-6.12.0/Image
Log artifact names (avoid collisions when jobs run in parallel):
- CI manual/push:
test-results-ci,test-results-latency - Nightly:
test-results-regression,test-results-latency