nfstest: migrate local integration test to Apple containers#31
Merged
Conversation
kchiu
force-pushed
the
migrate-nfstest-apple-container
branch
from
June 29, 2026 02:54
7864004 to
1db859d
Compare
Run the end-to-end NFSv3 integration test entirely on Apple's `container`
runtime, replacing the previous Earthly + Docker + QEMU pipeline. The server
and an nfstest_posix client now run as two containers on the default bridge;
the client mounts the server's /data export and runs the POSIX read/write
suite.
Apple's default container kernel ships with CONFIG_NFS_FS disabled (and no
loadable modules), so the client boots a custom kernel rebuilt from Apple's
own config with NFS v3 compiled in. `make nfstest-kernel` builds it once and
caches it under nfstest/kernel/out/ (gitignored).
- nfstest/server/Dockerfile, nfstest/client/Dockerfile: images built via
`container build`
- nfstest/kernel/: NFS-enabled kernel build + Apple's extracted base config
- nfstest/config/arcticwolf.test.toml: server config baked into the image
- nfstest/scripts/{nfstest.py,config.py}: orchestration via the container CLI
- Makefile: nfstest, nfstest-build, nfstest-kernel, nfstest-up, nfstest-down
- remove obsolete QEMU VM + SSH runner; drop Earthly server-docker/client-vm
Signed-off-by: Kuan-Kai Chiu <[email protected]>
Signed-off-by: Kuan-Kai Chiu <[email protected]>
kchiu
force-pushed
the
migrate-nfstest-apple-container
branch
from
June 30, 2026 03:59
1db859d to
0eadc0e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this changes
The local NFS integration test (
make nfstest) now runs entirely onApple's
containerruntime. Previouslyit needed three different tools stitched together — Earthly to build a
Docker image, Docker to run the server, and a QEMU virtual machine
(booted from a downloaded Alpine image + cloud-init) to act as the NFS client,
reached over SSH. This replaces all of that with two plain containers.
Why
make nfstestchecks that the Arctic Wolf NFS server actually works against areal Linux NFS client (the upstream
nfstest_posixsuite). To do that you needa Linux machine that can
mount -t nfs. On a Mac the old setup spun up a fullQEMU VM for this. Apple's
containerruntime can run Linux containers nativelyon macOS, each with its own IP address, so we can run both the server and the
client as lightweight containers and skip the VM, Docker, and Earthly entirely.
How it works now
make nfsteststarts two containers on the default192.168.64.0/24network:nfstest_posix, mounts the server's/dataexport, andruns the POSIX read/write tests against it.
The one tricky part: a custom kernel
Apple's default container kernel is built without the in-kernel NFS client
(
CONFIG_NFS_FSis off, and it has no loadable-module support), so a containersimply cannot mount NFS out of the box —
mount -t nfsfails withNo such device.To fix this, the client container boots a custom kernel: we take Apple's own
kernel config (extracted from a running container) and rebuild the same kernel
version with the NFS v3 client compiled in. This is a one-time, cached build:
The compiled kernel binary (~16 MB) is gitignored; the config it's built from
is committed so the build is reproducible.
File guide
nfstest/server/Dockerfilenfstest/client/Dockerfilenfstest/kernel/nfstest/config/arcticwolf.test.tomlnfstest/scripts/nfstest.pyMakefilenfstest,nfstest-build,nfstest-kernel,nfstest-up,nfstest-downRemoved: the QEMU VM definition (
nfstest/vm/), the SSH-based test runner(
nfstest/scripts/runner.py), and the Earthlyserver-docker/client-vmtargets.
Scope notes
make build/test/lintare unchanged (still Earthly).flow, and Apple
containeris macOS-only. This PR only changes the localdeveloper test.
Test results
make nfstestpasses end-to-end on macOS (Apple Silicon):