Developer workload tests
These are opt-in integration tests, separate from cargo xtask ci. Holger, PostgreSQL, their build tools and a disposable VM are developer prerequisites, not normal dependencies of any shipped Heimdall crate. xtask is unpublished; its test launcher adds no Cargo dependency. Rust-only test helpers belong under [dev-dependencies] when needed.
Holger CDS intake
Run cargo xtask test holger-intake inside a disposable QEMU/KVM guest on Oden. The command refuses a physical host and requires explicit HEIMDALL_TEST_VM=1. Build the worker and shim beforehand; do not run kernel tests on Oden's host kernel.
Developer prerequisites:
- A Holger checkout containing
server/scan-worker/tests/cds_intake_under_heimdall.rs, including its Git metadata and LFS fixtures. The initial integration uses main8a97f0f2plus that test. - Its release-mode static musl
holger-scan-worker, built with its locked dependencies (cargo build --release --locked -p holger-scan-worker --target x86_64-unknown-linux-musl). Use the build configuration the generated profile was measured against; debug assertions can introduce additional syscalls or argument patterns. - An executable
heimdall-container-shimbuilt with--features youki. - A guest kernel supporting Landlock, seccomp user notifications, user namespaces and writable cgroup v2 with cpu, memory and pids controllers delegated.
- Cargo, rustc, Git, sha256sum,
unshare,ipand the checked-out projects' build dependencies. Prebuild the three test targets withcargo test --no-runso all development dependencies are cached. The test commands run with Cargo offline, each in a new network namespace containing only loopback.
export HEIMDALL_TEST_VM=1
export HOLGER_SOURCE=/work/holger
export HOLGER_SCAN_WORKER_STATIC=/work/holger-target/x86_64-unknown-linux-musl/release/holger-scan-worker
export HEIMDALL_CONTAINER_SHIM=/work/bin/heimdall-container-shim
export HEIMDALL_WORKLOAD_RESULTS=/work/results/holger-001
cargo xtask test holger-intake
The results directory must not already exist. It records the kernel, toolchain, source revision and dirty summary, binary and lockfile hashes, generated test RON, individual test logs and final status. The RON names temporary fixture directories: it documents the test instance, not a persistent deployment configuration. Keys and trust material are generated afresh by the tests.
The suite runs Holger's existing real-runner job and generated-profile tests, plus one RON-configured boundary: OneWay, network: Offline instance. That instance disables fallback, refuses malformed and tampered inbox bundles, then accepts a signed update bundle carrying Rust, npm and Python package fixtures. That update bundle is served whole; this does not test the exported-package index views. Archive scanning also exercises those fixtures through the same configured runner. The full external package corpus is a separate Holger test and is explicitly excluded here.
Protection tested: the existing static generated seccomp profile and Heimdall's youki runner. This does not claim graph-follower enforcement. A future graph arm must first pass graph completeness checks, observe every relevant runtime event, and prove that a forbidden transition is stopped. Trace replay alone is insufficient.
Graph replay contract tests
cargo test --locked -p nordisk-heimdall-graph --test replay checks a test-only adapter around the prepared state machine. Synthetic records exercise independent thread cursors, fork inheritance, task-ID reuse, signal frames, invalid transitions, and refusal of incomplete or mismatched evidence. This is a normal Rust test; it does not install a filter or require Holger as a production dependency.
The adapter is not a capture implementation. Its coverage declarations must come from a trusted recorder; the adapter cannot establish that a producer reported all events truthfully. The existing probe's aggregate syscall pairs lack the ordered task-lifecycle and signal evidence needed for this replay. A real Holger replay therefore still requires both a complete graph and suitable runtime capture, matched to the exact worker binary. A completed native build alone proves neither.
VM capture prototype
The graph crate also contains an ignored, developer-only ptrace prototype for controlled fixtures. Run its seven supervisor tests only inside a disposable x86_64 GNU/Linux QEMU/KVM guest with pidfd_open(PIDFD_THREAD) support:
HEIMDALL_TEST_VM=1 cargo test --locked -p nordisk-heimdall-graph --test capture capture_ -- --ignored --test-threads=1 --nocapture
The capture_ filter excludes internal child fixtures, which the supervisor launches itself. Tests preserve repeated syscall entries and thread lifetimes, refuse observed signals and later execs, retire the former thread ID on nonleader exec, and report a record-limit stop as incomplete. Success and refusal must both clean up the traced tasks. Cleanup uses held thread pidfds and confirms ECHILD, including when an attached child was not yet registered. Unsupported thread pidfds fail setup. One deadline covers preparation, startup and capture; cleanup has a separate three-second grace that retries cannot renew. These are cooperative deadlines, not hard wall-clock guarantees. Raw reports appear in the test log. A separate unignored test checks event task IDs for overflow and invalid values.
This is not yet a recorder for arbitrary workers or input for the replay adapter. Artifact identity, stable interchange, handler frames, tracing escapes such as CLONE_UNTRACED, and concurrently mutable clone3 arguments are not covered. ordinary_complete describes the controlled fixture run only; it must not be converted into trusted replay coverage. Ptrace changes timing and scheduling, so these runs are not follower-performance benchmarks. No production dependency or runtime filter is added.
PostgreSQL 18 follow-up workload
The next scenario should compare identical data and queries with io_method=sync, worker and io_uring, using a PostgreSQL 18 build with liburing. Record the effective setting and observed I/O path; configuration alone is not proof that a query used io_uring. Include scans, concurrent clients and vacuum, and compare correctness before measuring throughput or latency. Use a private disposable cluster and Unix socket, never a developer's existing database.
This PostgreSQL scenario is not implemented by the command above. Its graph check must distinguish syscall transitions from operations submitted through shared rings; allowing io_uring_enter is not per-operation authorization.